Bladeren bron

wxGUI: catch and handle error from typo in console

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@65975 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 9 jaren geleden
bovenliggende
commit
5f8224a405
1 gewijzigde bestanden met toevoegingen van 2 en 0 verwijderingen
  1. 2 0
      gui/wxpython/gui_core/forms.py

+ 2 - 0
gui/wxpython/gui_core/forms.py

@@ -2440,6 +2440,8 @@ class GUI:
             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: