Explorar o código

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 %!s(int64=10) %!d(string=hai) anos
pai
achega
0594efcba8
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      lib/init/grass.py

+ 1 - 2
lib/init/grass.py

@@ -1362,8 +1362,6 @@ if windows:
     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 @@ set_language()
 
 # 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)