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

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Feb 20 06:39:50 PST 2014


Author: lucadelu
Date: 2014-02-20 06:39:50 -0800 (Thu, 20 Feb 2014)
New Revision: 59106

Modified:
   grass/trunk/lib/init/grass.py
Log:
move creation of .grass7 directory the first time that you run grass7, not at the end of first session

Modified: grass/trunk/lib/init/grass.py
===================================================================
--- grass/trunk/lib/init/grass.py	2014-02-20 12:00:42 UTC (rev 59105)
+++ grass/trunk/lib/init/grass.py	2014-02-20 14:39:50 UTC (rev 59106)
@@ -1239,6 +1239,9 @@
 gis_lock = str(os.getpid())
 os.environ['GIS_LOCK'] = gis_lock
 
+if not os.path.exists(grass_config_dir):
+    os.mkdir(grass_config_dir)
+
 # Set the global grassrc file
 batch_job = os.getenv('GRASS_BATCH_JOB')
 if batch_job:
@@ -1374,8 +1377,6 @@
 
 # Save GISRC
 s = readfile(gisrc)
-if not os.path.exists(grass_config_dir):
-    os.mkdir(grass_config_dir)
 writefile(gisrcrc, s)
 
 cleanup()



More information about the grass-commit mailing list