[GRASS-SVN] r65687 - grass-addons/grass7/vector/v.import
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jul 20 03:25:24 PDT 2015
Author: martinl
Date: 2015-07-20 03:25:24 -0700 (Mon, 20 Jul 2015)
New Revision: 65687
Modified:
grass-addons/grass7/vector/v.import/v.import.py
Log:
v.import: check if map exist
Modified: grass-addons/grass7/vector/v.import/v.import.py
===================================================================
--- grass-addons/grass7/vector/v.import/v.import.py 2015-07-20 10:12:49 UTC (rev 65686)
+++ grass-addons/grass7/vector/v.import/v.import.py 2015-07-20 10:25:24 UTC (rev 65687)
@@ -182,10 +182,13 @@
# if output is not define check source mapset
if not output:
output = grass.list_grouped('vector')['PERMANENT'][0]
-
+
# switch to target location
os.environ['GISRC'] = str(tgtgisrc)
-
+
+ if grass.find_file(output, element='vector', mapset='.'):
+ grass.fatal(_("option <%s>: <%s> exists.") % ('output', output))
+
if options['extents'] == 'region':
grass.run_command('g.remove', type = 'vector', name = vreg,
flags = 'f', quiet = True)
More information about the grass-commit
mailing list