##// END OF EJS Templates
templater: rename variable "i" to "v" in runmap()...
Yuya Nishihara -
r31806:8f203b49 default
parent child Browse files
Show More
@@ -411,17 +411,17 b' def runmap(context, mapping, data):'
411 else:
411 else:
412 raise error.ParseError(_("%r is not iterable") % d)
412 raise error.ParseError(_("%r is not iterable") % d)
413
413
414 for i in diter:
414 for v in diter:
415 lm = mapping.copy()
415 lm = mapping.copy()
416 if isinstance(i, dict):
416 if isinstance(v, dict):
417 lm.update(i)
417 lm.update(v)
418 lm['originalnode'] = mapping.get('node')
418 lm['originalnode'] = mapping.get('node')
419 yield tfunc(context, lm, tdata)
419 yield tfunc(context, lm, tdata)
420 else:
420 else:
421 # v is not an iterable of dicts, this happen when 'key'
421 # v is not an iterable of dicts, this happen when 'key'
422 # has been fully expanded already and format is useless.
422 # has been fully expanded already and format is useless.
423 # If so, return the expanded value.
423 # If so, return the expanded value.
424 yield i
424 yield v
425
425
426 def buildnegate(exp, context):
426 def buildnegate(exp, context):
427 arg = compileexp(exp[1], context, exprmethods)
427 arg = compileexp(exp[1], context, exprmethods)
General Comments 0
You need to be logged in to leave comments. Login now