[GRASS-SVN] r64425 - grass/trunk/scripts/d.redraw

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Feb 3 07:01:36 PST 2015


Author: martinl
Date: 2015-02-03 07:01:35 -0800 (Tue, 03 Feb 2015)
New Revision: 64425

Modified:
   grass/trunk/scripts/d.redraw/d.redraw.py
Log:
d.redraw: use d.info -s

Modified: grass/trunk/scripts/d.redraw/d.redraw.py
===================================================================
--- grass/trunk/scripts/d.redraw/d.redraw.py	2015-02-03 14:44:31 UTC (rev 64424)
+++ grass/trunk/scripts/d.redraw/d.redraw.py	2015-02-03 15:01:35 UTC (rev 64425)
@@ -27,12 +27,11 @@
 from grass.script.utils import split
 
 def main():
-    env = grass.gisenv()
-    mon = env.get('MONITOR', None)
+    mon = grass.gisenv().get('MONITOR', None)
     if not mon:
         grass.fatal(_("No graphics device selected. Use d.mon to select graphics device."))
 
-    monCmd = os.sep.join(grass.tempfile().split(os.sep)[:-1] + ['MONITORS', mon, 'cmd'])
+    monCmd = grass.parse_command('d.info', flags='s').get('cmd', None)
     if not monCmd or not os.path.isfile(monCmd):
         grass.fatal(_("Unable to open file '%s'") % monCmd)
 



More information about the grass-commit mailing list