[GRASS-SVN] r64428 - in grass/trunk/scripts: d.what.rast d.what.vect
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Feb 3 07:50:56 PST 2015
Author: martinl
Date: 2015-02-03 07:50:56 -0800 (Tue, 03 Feb 2015)
New Revision: 64428
Modified:
grass/trunk/scripts/d.what.rast/d.what.rast.py
grass/trunk/scripts/d.what.vect/d.what.vect.py
Log:
update d.what.rast and d.what.vect to the new monitor architecture
Modified: grass/trunk/scripts/d.what.rast/d.what.rast.py
===================================================================
--- grass/trunk/scripts/d.what.rast/d.what.rast.py 2015-02-03 15:41:52 UTC (rev 64427)
+++ grass/trunk/scripts/d.what.rast/d.what.rast.py 2015-02-03 15:50:56 UTC (rev 64428)
@@ -5,7 +5,7 @@
# MODULE: d.what.rast
# AUTHOR(S): Anna Petrasova <kratochanna gmail.com>
# PURPOSE: Script for querying raster maps in d.mon
-# COPYRIGHT: (C) 2014 by the GRASS Development Team
+# COPYRIGHT: (C) 2014-2015 by the GRASS Development Team
#
# This program is free software under the GNU General
# Public License (>=v2). Read the file COPYING that
@@ -30,7 +30,9 @@
options, flags = gcore.parser()
gisenv = gcore.gisenv()
if 'MONITOR' in gisenv:
- cmd_file = gisenv['MONITOR_{monitor}_CMDFILE'.format(monitor=gisenv['MONITOR'].upper())]
+ cmd_file = gcore.parse_command('d.info', flags='s').get('cmd', None)
+ if not cmd_file:
+ gcore.fatal(_("Unable to open file '%s'") % cmd_file)
dout_cmd = 'd.what.rast'
for param, val in options.iteritems():
if val:
Modified: grass/trunk/scripts/d.what.vect/d.what.vect.py
===================================================================
--- grass/trunk/scripts/d.what.vect/d.what.vect.py 2015-02-03 15:41:52 UTC (rev 64427)
+++ grass/trunk/scripts/d.what.vect/d.what.vect.py 2015-02-03 15:50:56 UTC (rev 64428)
@@ -30,7 +30,9 @@
options, flags = gcore.parser()
gisenv = gcore.gisenv()
if 'MONITOR' in gisenv:
- cmd_file = gisenv['MONITOR_{monitor}_CMDFILE'.format(monitor=gisenv['MONITOR'].upper())]
+ cmd_file = gcore.parse_command('d.info', flags='s').get('cmd', None)
+ if not cmd_file:
+ gcore.fatal(_("Unable to open file '%s'") % cmd_file)
dout_cmd = 'd.what.vect'
for param, val in options.iteritems():
if val:
More information about the grass-commit
mailing list