Return original string for non-matched vars

pull/1648/head
Daniel Hokka Zakrisson 12 years ago
parent 4399d9c3cb
commit 07ba7e2013

@ -187,7 +187,10 @@ def varReplaceWithItems(basedir, varname, vars):
if not m:
return varname
if m['start'] == 0 and m['end'] == len(varname):
return varReplaceWithItems(basedir, m['replacement'], vars)
if m['replacement'] is not None:
return varReplaceWithItems(basedir, m['replacement'], vars)
else:
return varname
else:
return template(basedir, varname, vars)
elif isinstance(varname, (list, tuple)):

Loading…
Cancel
Save