Explorar o código

wxGUI: bugfix for trac https://trac.osgeo.org/grass/ticket/176 (merge from devbr6, https://trac.osgeo.org/grass/changeset/31508)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@31509 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa %!s(int64=17) %!d(string=hai) anos
pai
achega
6090a211b3
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      gui/wxpython/gui_modules/goutput.py

+ 2 - 2
gui/wxpython/gui_modules/goutput.py

@@ -396,8 +396,8 @@ class GMStderr:
 
             if 'GRASS_INFO_PERCENT' in line:
                 # 'GRASS_INFO_PERCENT: 10' -> value=10
-                value = int(line.split(':')[1].strip())
-                if value < 100:
+                value = int(line.rsplit(':', 1)[1].strip())
+                if value >= 0 and value < 100:
                     self.gmgauge.SetValue(value)
                 else:
                     self.gmgauge.SetValue(0) # reset progress bar on '0%'