[GRASS-dev] wxGUI command line: white space between - and flag name generates Python error
Markus Neteler
neteler at osgeo.org
Thu Aug 20 04:14:14 PDT 2015
Hi,
if one enters (note the white space)
g.proj - w
into the wxGUI cmd line, then Python gets unhappy with:
Traceback (most recent call last):
File "/home/neteler/software/grass70/dist.x86_64-unknown-
linux-gnu/gui/wxpython/gui_core/prompt.py", line 399, in
OnKeyPressed
self._runCmd(self.GetCurLine()[0].strip())
File "/home/neteler/software/grass70/dist.x86_64-unknown-
linux-gnu/gui/wxpython/gui_core/prompt.py", line 118, in
_runCmd
self.promptRunCmd.emit(cmd=cmd)
File "/home/neteler/software/grass70/dist.x86_64-unknown-
linux-gnu/etc/python/grass/pydispatch/signal.py", line 229,
in emit
dispatcher.send(signal=self, *args, **kwargs)
File "/home/neteler/software/grass70/dist.x86_64-unknown-
linux-gnu/etc/python/grass/pydispatch/dispatcher.py", line
349, in send
**named
File "/home/neteler/software/grass70/dist.x86_64-unknown-
linux-gnu/etc/python/grass/pydispatch/robustapply.py", line
60, in robustApply
return receiver(*arguments, **named)
File "/home/neteler/software/grass70/dist.x86_64-unknown-
linux-gnu/gui/wxpython/gui_core/goutput.py", line 106, in
<lambda>
self._gconsole.RunCmd(command=cmd))
File "/home/neteler/software/grass70/dist.x86_64-unknown-
linux-gnu/gui/wxpython/core/gconsole.py", line 470, in
RunCmd
task = GUI(show=None).ParseCommand(command)
File "/home/neteler/software/grass70/dist.x86_64-unknown-
linux-gnu/gui/wxpython/gui_core/forms.py", line 2363, in
ParseCommand
if option[1] == '-':
IndexError
:
string index out of range
Is there a way to catch that?
thanks
Markus
More information about the grass-dev
mailing list