[GRASS-SVN] r54490 - grass/trunk/lib/init
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jan 1 14:12:45 PST 2013
Author: martinl
Date: 2013-01-01 14:12:45 -0800 (Tue, 01 Jan 2013)
New Revision: 54490
Modified:
grass/trunk/lib/init/grass.py
Log:
grass.py: fix cleanup() when no location is defined
Modified: grass/trunk/lib/init/grass.py
===================================================================
--- grass/trunk/lib/init/grass.py 2013-01-01 21:46:22 UTC (rev 54489)
+++ grass/trunk/lib/init/grass.py 2013-01-01 22:12:45 UTC (rev 54490)
@@ -106,9 +106,12 @@
tmpdir, lockfile, remove_lockfile
# all exits after setting up tmp dirs (system/location) should
# also tidy it up
- for tmpd in [tmpdir, os.path.join(location, ".tmp")]:
- cleanup_dir(tmpd)
- try_rmdir(tmpd)
+ cleanup_dir(tmpdir)
+ try_rmdir(tmpdir)
+ if location:
+ tmpdir_loc = os.path.join(location, ".tmp")
+ cleanup_dir(tmpdir_loc)
+ try_rmdir(tmpdir_loc)
# remove lock-file if requested
if lockfile and remove_lockfile:
More information about the grass-commit
mailing list