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

svn_grass at osgeo.org svn_grass at osgeo.org
Sat May 16 18:08:53 PDT 2015


Author: martinl
Date: 2015-05-16 18:08:53 -0700 (Sat, 16 May 2015)
New Revision: 65258

Modified:
   grass/trunk/lib/init/grass.py
Log:
grass.py: fix cleanup - must be registered when tmpdir variable is initialized

Modified: grass/trunk/lib/init/grass.py
===================================================================
--- grass/trunk/lib/init/grass.py	2015-05-17 01:01:30 UTC (rev 65257)
+++ grass/trunk/lib/init/grass.py	2015-05-17 01:08:53 UTC (rev 65258)
@@ -1362,8 +1362,6 @@
     if not os.getenv('SHELL'):
         os.environ['SHELL'] = os.getenv('COMSPEC', 'cmd.exe')
 
-atexit.register(cleanup, tmpdir)
-
 # Set default GUI
 default_gui = "wxpython"
 
@@ -1431,6 +1429,7 @@
 
 # Create the temporary directory and session grassrc file
 tmpdir = create_tmp()
+atexit.register(cleanup, tmpdir)
 
 # Create the session grassrc file
 gisrc = create_gisrc(tmpdir, gisrcrc)



More information about the grass-commit mailing list