[GRASS-SVN] r50213 -
grass/branches/develbranch_6/gui/wxpython/gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jan 16 05:21:48 EST 2012
Author: martinl
Date: 2012-01-16 02:21:48 -0800 (Mon, 16 Jan 2012)
New Revision: 50213
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_core/goutput.py
Log:
wxGUI: fix launching r.mapcalc from command prompt
Modified: grass/branches/develbranch_6/gui/wxpython/gui_core/goutput.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_core/goutput.py 2012-01-16 10:16:53 UTC (rev 50212)
+++ grass/branches/develbranch_6/gui/wxpython/gui_core/goutput.py 2012-01-16 10:21:48 UTC (rev 50213)
@@ -525,23 +525,27 @@
if sys.platform == 'win32':
if command[0] in globalvar.grassCmd['script']:
command[0] += globalvar.EXT_SCT
- task = GUI(show = None).ParseCommand(command)
+
hasParams = False
- if task:
- options = task.get_options()
- hasParams = options['params'] and options['flags']
- # check for <input>=-
- for p in options['params']:
- if p.get('prompt', '') == 'input' and \
- p.get('element', '') == 'file' and \
- p.get('age', 'new') == 'old' and \
- p.get('value', '') == '-':
- GError(parent = self,
- message = _("Unable to run command:\n%(cmd)s\n\n"
- "Option <%(opt)s>: read from standard input is not "
- "supported by wxGUI") % { 'cmd': ' '.join(command),
- 'opt': p.get('name', '') })
- return 1
+ if command[0] != 'r.mapcalc':
+ task = GUI(show = None).ParseCommand(command)
+ if task:
+ options = task.get_options()
+ hasParams = options['params'] and options['flags']
+ # check for <input>=-
+ for p in options['params']:
+ if p.get('prompt', '') == 'input' and \
+ p.get('element', '') == 'file' and \
+ p.get('age', 'new') == 'old' and \
+ p.get('value', '') == '-':
+ GError(parent = self,
+ message = _("Unable to run command:\n%(cmd)s\n\n"
+ "Option <%(opt)s>: read from standard input is not "
+ "supported by wxGUI") % { 'cmd': ' '.join(command),
+ 'opt': p.get('name', '') })
+ return 1
+ else:
+ task = None
if len(command) == 1 and hasParams and \
command[0] != 'v.krige.py':
More information about the grass-commit
mailing list