[GRASS-SVN] r67382 - grass-addons/grass7/raster/r.subdayprecip.design
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Dec 26 04:55:08 PST 2015
Author: martinl
Date: 2015-12-26 04:55:08 -0800 (Sat, 26 Dec 2015)
New Revision: 67382
Modified:
grass-addons/grass7/raster/r.subdayprecip.design/r.subdayprecip.design.py
Log:
r.subdayprecip.design: check if vector map is in the current mapset
Modified: grass-addons/grass7/raster/r.subdayprecip.design/r.subdayprecip.design.py
===================================================================
--- grass-addons/grass7/raster/r.subdayprecip.design/r.subdayprecip.design.py 2015-12-26 12:45:20 UTC (rev 67381)
+++ grass-addons/grass7/raster/r.subdayprecip.design/r.subdayprecip.design.py 2015-12-26 12:55:08 UTC (rev 67382)
@@ -114,6 +114,11 @@
return a, c
def main():
+ # check if the map is in the current mapset
+ mapset = grass.find_file(opt['map'], element='vector')['mapset']
+ if not mapset or mapset != grass.gisenv()['MAPSET']:
+ grass.fatal(_("Vector map <{}> not found in the current mapset").format(opt['map']))
+
# get list of existing columns
try:
columns = grass.vector_columns(opt['map']).keys()
More information about the grass-commit
mailing list