Browse Source

wxGUI: added error handling for https://trac.osgeo.org/grass/ticket/1750

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@53298 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 12 years ago
parent
commit
cba84015a4
1 changed files with 5 additions and 1 deletions
  1. 5 1
      gui/wxpython/gui_core/prompt.py

+ 5 - 1
gui/wxpython/gui_core/prompt.py

@@ -860,7 +860,11 @@ class GPromptSTC(GPrompt, wx.stc.StyledTextCtrl):
         except IndexError:
             return None
         
-        if len(utils.split(str(entry))) > 1:
+        try:
+            splitted = utils.split(str(entry))
+        except ValueError: # No closing quotation error
+            return None
+        if len(splitted) > 1:
             if cmd in globalvar.grassCmd:
                 toComplete['cmd'] = cmd
                 if entry[-1] == ' ':