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

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jan 30 15:33:36 EST 2012


Author: martinl
Date: 2012-01-30 12:33:36 -0800 (Mon, 30 Jan 2012)
New Revision: 50571

Modified:
   grass/trunk/gui/wxpython/gui_core/goutput.py
Log:
wxGUI: change return type of RunCmd()


Modified: grass/trunk/gui/wxpython/gui_core/goutput.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/goutput.py	2012-01-30 20:32:16 UTC (rev 50570)
+++ grass/trunk/gui/wxpython/gui_core/goutput.py	2012-01-30 20:33:36 UTC (rev 50571)
@@ -459,7 +459,7 @@
         """
         if len(command) == 0:
             Debug.msg(2, "GPrompt:RunCmd(): empty command")
-            return 0
+            return
         
         # update history file
         env = grass.gisenv()
@@ -509,7 +509,7 @@
                     GMessage(parent = self.parent,
                              message = _("Command '%s' not yet implemented in the WxGUI. "
                                          "Try adding it as a command layer instead.") % command[0])
-                    return 1
+                    return
                 
                 if layertype == 'barscale':
                     self.parent.curr_page.maptree.GetMapDisplay().OnAddBarscale(None)
@@ -551,7 +551,7 @@
                                                "Option <%(opt)s>: read from standard input is not "
                                                "supported by wxGUI") % { 'cmd': ' '.join(command),
                                                                          'opt': p.get('name', '') })
-                            return 1
+                            return
                 
                 if len(command) == 1 and hasParams and \
                         command[0] != 'v.krige':
@@ -560,7 +560,7 @@
                         GUI(parent = self).ParseCommand(command)
                     except GException, e:
                         print >> sys.stderr, e
-                    return 0
+                    return
                 
                 # switch to 'Command output' if required
                 if switchPage:
@@ -603,8 +603,6 @@
                                       onDone = onDone, onPrepare = onPrepare, userData = userData)
             self.cmdOutputTimer.Start(50)
         
-        return 0
-
     def ClearHistory(self, event):
         """!Clear history of commands"""
         self.cmdOutput.SetReadOnly(False)



More information about the grass-commit mailing list