[GRASS-SVN] r65975 - grass/trunk/gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Aug 20 04:48:10 PDT 2015


Author: annakrat
Date: 2015-08-20 04:48:10 -0700 (Thu, 20 Aug 2015)
New Revision: 65975

Modified:
   grass/trunk/gui/wxpython/gui_core/forms.py
Log:
wxGUI: catch and handle error from typo in console

Modified: grass/trunk/gui/wxpython/gui_core/forms.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/forms.py	2015-08-20 11:05:51 UTC (rev 65974)
+++ grass/trunk/gui/wxpython/gui_core/forms.py	2015-08-20 11:48:10 UTC (rev 65975)
@@ -2440,6 +2440,8 @@
             cmd_validated = [cmd[0]]
             for option in cmd[1:]:
                 if option[0] == '-': # flag
+                    if len(option) == 1:  # catch typo like 'g.proj - w'
+                        raise gcmd.GException, _("Unable to parse command '%s'") % ' '.join(cmd)
                     if option[1] == '-':
                         self.grass_task.set_flag(option[2:], True)
                     else:



More information about the grass-commit mailing list