[GRASS-SVN] r48085 - grass/trunk/scripts/v.rast.stats
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Sep 3 04:49:57 EDT 2011
Author: neteler
Date: 2011-09-03 01:49:57 -0700 (Sat, 03 Sep 2011)
New Revision: 48085
Modified:
grass/trunk/scripts/v.rast.stats/v.rast.stats.py
Log:
fixed two bugs
Modified: grass/trunk/scripts/v.rast.stats/v.rast.stats.py
===================================================================
--- grass/trunk/scripts/v.rast.stats/v.rast.stats.py 2011-09-03 07:26:51 UTC (rev 48084)
+++ grass/trunk/scripts/v.rast.stats/v.rast.stats.py 2011-09-03 08:49:57 UTC (rev 48085)
@@ -31,6 +31,7 @@
#% description: Calculate extended statistics
#%end
#%option G_OPT_V_MAP
+#% key: vector
#%end
#%option G_OPT_V_FIELD
#%end
@@ -62,7 +63,8 @@
return
def cleanup():
- grass.run_command('g.remove', rast = rastertmp, quiet = True)
+ if rastertmp:
+ grass.run_command('g.remove', rast = rastertmp, quiet = True)
grass.run_command('g.remove', rast = 'MASK', quiet = True, stderr = nuldev)
if mask_found:
grass.message(_("Restoring previous MASK..."))
@@ -73,6 +75,7 @@
def main():
global tmp, sqltmp, tmpname, nuldev, vector, mask_found, rastertmp
mask_found = False
+ rastertmp = False
#### setup temporary files
tmp = grass.tempfile()
sqltmp = tmp + ".sql"
More information about the grass-commit
mailing list