[GRASS-SVN] r38718 - grass/trunk/scripts/v.db.droprow

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Aug 14 06:14:22 EDT 2009


Author: martinl
Date: 2009-08-14 06:14:21 -0400 (Fri, 14 Aug 2009)
New Revision: 38718

Modified:
   grass/trunk/scripts/v.db.droprow/v.db.droprow.py
Log:
v.db.droprow: check if vector map exists is already done v v.extract

Modified: grass/trunk/scripts/v.db.droprow/v.db.droprow.py
===================================================================
--- grass/trunk/scripts/v.db.droprow/v.db.droprow.py	2009-08-14 08:51:58 UTC (rev 38717)
+++ grass/trunk/scripts/v.db.droprow/v.db.droprow.py	2009-08-14 10:14:21 UTC (rev 38718)
@@ -59,20 +59,13 @@
 import grass.script as grass
 
 def main():
-    file = grass.find_file(element = 'vector', name = options['input'],
-                           mapset = grass.gisenv()['MAPSET'])['name']
-    
-    if not file:
-        grass.fatal(_("Vector map <%s> not found in current mapset") % \
-                        options['input'])
-    
     # delete vectors via reverse selection
     ret = grass.run_command('v.extract',
                             flags = 'r',
                             input = options['input'], layer = options['layer'],
                             output = options['output'], where = options['where'])
     if ret != 0:
-        grass.fatal(_("Error in 'where' statement"))
+        return 1
 
     # write cmd history:
     grass.vector_history(map = options['output'])



More information about the grass-commit mailing list