[GRASS-SVN] r56772 - grass-addons/grass6/raster/r.hazard.flood
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jun 18 01:47:38 PDT 2013
Author: hamish
Date: 2013-06-18 01:47:37 -0700 (Tue, 18 Jun 2013)
New Revision: 56772
Modified:
grass-addons/grass6/raster/r.hazard.flood/r.hazard.flood.py
Log:
commented out check for r.area, grass.messageify
Modified: grass-addons/grass6/raster/r.hazard.flood/r.hazard.flood.py
===================================================================
--- grass-addons/grass6/raster/r.hazard.flood/r.hazard.flood.py 2013-06-18 08:11:22 UTC (rev 56771)
+++ grass-addons/grass6/raster/r.hazard.flood/r.hazard.flood.py 2013-06-18 08:47:37 UTC (rev 56772)
@@ -50,9 +50,9 @@
import grass.script as grass
except:
try:
- from grass.script import core as grass
+ from grass.script import core as grass
except:
- sys.exit( "grass.script can't be imported.")
+ sys.exit("grass.script can't be imported.")
if not os.environ.has_key("GISBASE"):
print "You must be in GRASS GIS to run this program."
@@ -66,6 +66,11 @@
r_flood_map = options['flood']
r_mti = options['mti']
+ #FIXME: find_program() not working for modules
+ ## check if we have the r.area addon
+ #if not grass.find_program('r.area'):
+ # grass.fatal(_("The r.area module is required, please install it from Addons first"))
+
# Detect cellsize of the DEM
info_region = grass.read_command('g.region', flags = 'p', rast = '%s' % (r_elevation))
dict_region = grass.parse_key_val(info_region, ':')
@@ -130,7 +135,7 @@
grass.run_command('g.remove', rast = 'r_flood_th')
grass.run_command('g.remove', rast = 'r_flood')
- grass.run_command('g.message' , message = 'Done!')
+ grass.message(_('Done.'))
if __name__ == "__main__":
options, flags = grass.parser()
More information about the grass-commit
mailing list