[GRASS-SVN] r40127 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Dec 24 07:10:12 EST 2009


Author: martinl
Date: 2009-12-24 07:10:10 -0500 (Thu, 24 Dec 2009)
New Revision: 40127

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/prompt.py
Log:
wxGUI/prompt: don't fail on IndexError
	      (merge r40126 from trunk)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/prompt.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/prompt.py	2009-12-24 12:08:43 UTC (rev 40126)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/prompt.py	2009-12-24 12:10:10 UTC (rev 40127)
@@ -497,7 +497,7 @@
     def __init__(self, parent):
         self.parent = parent                 # GMConsole
         self.panel  = self.parent.GetPanel()
-
+        
         if self.parent.parent.GetName() != "LayerManager":
             self.standAlone = True
         else:
@@ -747,7 +747,11 @@
             
             pos = self.GetCurrentPos()
             entry = self.GetTextLeft()
-            cmd = entry.split()[0].strip()
+            try:
+                cmd = entry.split()[0].strip()
+            except IndexError:
+                cmd = ''
+            
             if cmd not in globalvar.grassCmd['all']:
                 return
             



More information about the grass-commit mailing list