[GRASS-SVN] r48870 - grass/trunk/gui/wxpython/gui_modules

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


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

Modified:
   grass/trunk/gui/wxpython/gui_modules/gmodeler.py
Log:
wxGUI/modeler: cosmetics in variables substitution


Modified: grass/trunk/gui/wxpython/gui_modules/gmodeler.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gmodeler.py	2011-10-20 00:40:53 UTC (rev 48869)
+++ grass/trunk/gui/wxpython/gui_modules/gmodeler.py	2011-10-20 01:01:05 UTC (rev 48870)
@@ -1858,7 +1858,7 @@
         
             for variable in variables:
                 pattern= re.compile('%' + variable)
-                value = None
+                value = ''
                 if params:
                     for p in params:
                         if variable == p.get('name', ''):
@@ -1870,11 +1870,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