[GRASS-SVN] r67280 - grass/trunk/gui/wxpython/gmodeler
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Dec 20 05:43:30 PST 2015
Author: martinl
Date: 2015-12-20 05:43:30 -0800 (Sun, 20 Dec 2015)
New Revision: 67280
Modified:
grass/trunk/gui/wxpython/gmodeler/model.py
Log:
wxGUI/gmodeler: fix checking undefined variables
Modified: grass/trunk/gui/wxpython/gmodeler/model.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/model.py 2015-12-20 13:21:30 UTC (rev 67279)
+++ grass/trunk/gui/wxpython/gmodeler/model.py 2015-12-20 13:43:30 UTC (rev 67280)
@@ -450,8 +450,13 @@
key, value = opt.split('=', 1)
sval = pattern.search(value)
if sval:
- var = sval.group(2).strip()[1:] # ignore '%'
- if var not in variables:
+ var = sval.group(2).strip()[1:] # strip '%' from beginning
+ found = False
+ for v in variables:
+ if var.startswith(v):
+ found = True
+ break
+ if not found:
report = True
for item in filter(lambda x: isinstance(x, ModelLoop), action.GetBlock()):
if var in item.GetLabel():
More information about the grass-commit
mailing list