[GRASS-SVN] r34959 - grass/trunk/scripts/v.dissolve

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Dec 20 12:29:03 EST 2008


Author: martinl
Date: 2008-12-20 12:29:03 -0500 (Sat, 20 Dec 2008)
New Revision: 34959

Modified:
   grass/trunk/scripts/v.dissolve/v.dissolve.py
Log:
v.dissolve: don't run v.extract if v.reclass failed


Modified: grass/trunk/scripts/v.dissolve/v.dissolve.py
===================================================================
--- grass/trunk/scripts/v.dissolve/v.dissolve.py	2008-12-20 17:07:13 UTC (rev 34958)
+++ grass/trunk/scripts/v.dissolve/v.dissolve.py	2008-12-20 17:29:03 UTC (rev 34959)
@@ -94,12 +94,11 @@
 
 	tmpfile = '%s_%s' % (output, tmp)
 
-	grass.run_command('v.reclass', input = input, output = tmpfile,
-			  layer = layer, column = column)
+	if grass.run_command('v.reclass', input = input, output = tmpfile,
+                             layer = layer, column = column) == 0:
+            grass.run_command('v.extract', flags = 'd', input = tmpfile,
+                              output = output, type = 'area', layer = layer)
 
-	grass.run_command('v.extract', flags = 'd', input = tmpfile,
-			  output = output, type = 'area', layer = layer)
-
     # write cmd history:
     grass.vector_history(output)
 



More information about the grass-commit mailing list