[GRASS-SVN] r73263 - grass/trunk/lib/init

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Sep 4 20:26:37 PDT 2018


Author: wenzeslaus
Date: 2018-09-04 20:26:37 -0700 (Tue, 04 Sep 2018)
New Revision: 73263

Modified:
   grass/trunk/lib/init/grass.py
Log:
init: report when rc file is empty

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


Modified: grass/trunk/lib/init/grass.py
===================================================================
--- grass/trunk/lib/init/grass.py	2018-09-05 03:22:45 UTC (rev 73262)
+++ grass/trunk/lib/init/grass.py	2018-09-05 03:26:37 UTC (rev 73263)
@@ -542,6 +542,8 @@
                           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



More information about the grass-commit mailing list