[GRASS-SVN] r41169 - grass/trunk/scripts/d.vect.thematic
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Feb 23 16:42:40 EST 2010
Author: glynn
Date: 2010-02-23 16:42:39 -0500 (Tue, 23 Feb 2010)
New Revision: 41169
Modified:
grass/trunk/scripts/d.vect.thematic/d.vect.thematic.py
Log:
Fix cleanup
Modified: grass/trunk/scripts/d.vect.thematic/d.vect.thematic.py
===================================================================
--- grass/trunk/scripts/d.vect.thematic/d.vect.thematic.py 2010-02-23 18:32:26 UTC (rev 41168)
+++ grass/trunk/scripts/d.vect.thematic/d.vect.thematic.py 2010-02-23 21:42:39 UTC (rev 41169)
@@ -230,10 +230,16 @@
import atexit
import grass.script as grass
+tmp_graph = None
+tmp_group = None
+tmp_psmap = None
+tmp_psleg = None
+tmp_gisleg = None
+
def cleanup():
- for i in xrange(1,6+1):
- grass.try_remove(tmpfile[i])
- grass.try_remove(tmpfile[i] + ".sort")
+ for file in [tmp_graph, tmp_group, tmp_psmap, tmp_psleg, tmp_gisleg]:
+ if file:
+ grass.try_remove(file)
# hard-coded parameter: the maximum number of legend items before
# we strip them using a middle ellipsis
@@ -249,6 +255,8 @@
fh.write(subs(vars, tmpl))
def main():
+ global tmp_graph, tmp_group, tmp_psmap, tmp_psleg, tmp_gisleg
+
breakpoints = options['breakpoints']
colorscheme = options['colorscheme']
column = options['column']
More information about the grass-commit
mailing list