[GRASS-SVN] r57923 - grass/trunk/scripts/d.rast.leg
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Oct 3 04:48:46 PDT 2013
Author: martinl
Date: 2013-10-03 04:48:46 -0700 (Thu, 03 Oct 2013)
New Revision: 57923
Modified:
grass/trunk/scripts/d.rast.leg/d.rast.leg.py
Log:
d.rast.leg: check d.info output
Modified: grass/trunk/scripts/d.rast.leg/d.rast.leg.py
===================================================================
--- grass/trunk/scripts/d.rast.leg/d.rast.leg.py 2013-10-03 11:18:19 UTC (rev 57922)
+++ grass/trunk/scripts/d.rast.leg/d.rast.leg.py 2013-10-03 11:48:46 UTC (rev 57923)
@@ -104,6 +104,9 @@
grass.fatal(_("Raster map <%s> not found in mapset search path") % rast)
s = grass.read_command('d.info', flags = 'f')
+ if not s:
+ sys.exit(1)
+
f = tuple([float(x) for x in s.split()[1:5]])
grass.run_command('d.erase')
More information about the grass-commit
mailing list