Ver código fonte

grass.py: fix cleanup - must be registered when tmpdir variable is initialized

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@65258 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 10 anos atrás
pai
commit
0594efcba8
1 arquivos alterados com 1 adições e 2 exclusões
  1. 1 2
      lib/init/grass.py

+ 1 - 2
lib/init/grass.py

@@ -1362,8 +1362,6 @@ if windows:
     if not os.getenv('SHELL'):
     if not os.getenv('SHELL'):
         os.environ['SHELL'] = os.getenv('COMSPEC', 'cmd.exe')
         os.environ['SHELL'] = os.getenv('COMSPEC', 'cmd.exe')
 
 
-atexit.register(cleanup, tmpdir)
-
 # Set default GUI
 # Set default GUI
 default_gui = "wxpython"
 default_gui = "wxpython"
 
 
@@ -1431,6 +1429,7 @@ set_language()
 
 
 # Create the temporary directory and session grassrc file
 # Create the temporary directory and session grassrc file
 tmpdir = create_tmp()
 tmpdir = create_tmp()
+atexit.register(cleanup, tmpdir)
 
 
 # Create the session grassrc file
 # Create the session grassrc file
 gisrc = create_gisrc(tmpdir, gisrcrc)
 gisrc = create_gisrc(tmpdir, gisrcrc)