瀏覽代碼

init: report when rc file is empty

Useful filename is reported only later on (home), here the one in /tmp.


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@73263 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras 6 年之前
父節點
當前提交
baa9c3abdb
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      lib/init/grass.py

+ 2 - 0
lib/init/grass.py

@@ -542,6 +542,8 @@ def read_gisrc(filename):
                           line=line, error=e, file=filename))
             continue
         kv[k.strip()] = v.strip()
+    if not kv:
+        warning(_("Empty RC file ({file})").format(file=filename))
     f.close()
 
     return kv