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

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Oct 19 21:01:52 EDT 2011


Author: martinl
Date: 2011-10-19 18:01:52 -0700 (Wed, 19 Oct 2011)
New Revision: 48871

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py
Log:
wxGUI/modeler: cosmetics in variables substitution
	       (merge r48870 from trunk)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py	2011-10-20 01:01:05 UTC (rev 48870)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py	2011-10-20 01:01:52 UTC (rev 48871)
@@ -1862,7 +1862,7 @@
         
             for variable in variables:
                 pattern= re.compile('%' + variable)
-                value = None
+                value = ''
                 if params:
                     for p in params:
                         if variable == p.get('name', ''):
@@ -1874,11 +1874,7 @@
                 
                 for idx in range(len(cmd)):
                     if pattern.search(cmd[idx]):
-                        if value:
-                            cmd[idx] = pattern.sub(value, cmd[idx])
-                        else:
-                            cmd[idx] = pattern.sub('', cmd[idx])
-                            self.isValid = False
+                        cmd[idx] = pattern.sub(value, cmd[idx])
                         break
                     idx += 1
         



More information about the grass-commit mailing list