[GRASS-SVN] r67283 - grass/branches/releasebranch_7_0/gui/wxpython/gmodeler
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Dec 20 07:14:26 PST 2015
Author: martinl
Date: 2015-12-20 07:14:26 -0800 (Sun, 20 Dec 2015)
New Revision: 67283
Modified:
grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/model.py
Log:
wxGUI/gmodeler: fix checking undefined variables
(merge r67280 from trunk)
Modified: grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/model.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/model.py 2015-12-20 15:04:40 UTC (rev 67282)
+++ grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/model.py 2015-12-20 15:14:26 UTC (rev 67283)
@@ -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