[GRASS-SVN] r50212 -
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jan 16 05:16:53 EST 2012
Author: martinl
Date: 2012-01-16 02:16:53 -0800 (Mon, 16 Jan 2012)
New Revision: 50212
Modified:
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/goutput.py
Log:
wxGUI: fix launching r.mapcalc from command prompt
Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/goutput.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/goutput.py 2012-01-16 08:17:12 UTC (rev 50211)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/goutput.py 2012-01-16 10:16:53 UTC (rev 50212)
@@ -518,23 +518,26 @@
if sys.platform == 'win32':
if command[0] in globalvar.grassCmd['script']:
command[0] += globalvar.EXT_SCT
- task = menuform.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_file' and \
- p.get('value', '') == '-':
- gcmd.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 None
+ if command[0] != 'r.mapcalc':
+ task = menuform.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_file' and \
+ p.get('value', '') == '-':
+ gcmd.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 None
+ else:
+ task = None
if len(command) == 1 and hasParams:
# no arguments given
More information about the grass-commit
mailing list