소스 검색

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