Show More
@@ -148,7 +148,7 b' def runsymbol(context, mapping, key):' | |||||
148 | v = context.process(key, mapping) |
|
148 | v = context.process(key, mapping) | |
149 | except TemplateNotFound: |
|
149 | except TemplateNotFound: | |
150 | v = '' |
|
150 | v = '' | |
151 | if util.safehasattr(v, '__call__'): |
|
151 | if callable(v): | |
152 | return v(**mapping) |
|
152 | return v(**mapping) | |
153 | if isinstance(v, types.GeneratorType): |
|
153 | if isinstance(v, types.GeneratorType): | |
154 | v = list(v) |
|
154 | v = list(v) | |
@@ -185,7 +185,7 b' def runtemplate(context, mapping, templa' | |||||
185 | def runmap(context, mapping, data): |
|
185 | def runmap(context, mapping, data): | |
186 | func, data, ctmpl = data |
|
186 | func, data, ctmpl = data | |
187 | d = func(context, mapping, data) |
|
187 | d = func(context, mapping, data) | |
188 | if util.safehasattr(d, '__call__'): |
|
188 | if callable(d): | |
189 | d = d() |
|
189 | d = d() | |
190 |
|
190 | |||
191 | lm = mapping.copy() |
|
191 | lm = mapping.copy() | |
@@ -335,7 +335,7 b' def join(context, mapping, args):' | |||||
335 | raise error.ParseError(_("join expects one or two arguments")) |
|
335 | raise error.ParseError(_("join expects one or two arguments")) | |
336 |
|
336 | |||
337 | joinset = args[0][0](context, mapping, args[0][1]) |
|
337 | joinset = args[0][0](context, mapping, args[0][1]) | |
338 | if util.safehasattr(joinset, '__call__'): |
|
338 | if callable(joinset): | |
339 | jf = joinset.joinfmt |
|
339 | jf = joinset.joinfmt | |
340 | joinset = [jf(x) for x in joinset()] |
|
340 | joinset = [jf(x) for x in joinset()] | |
341 |
|
341 |
General Comments 0
You need to be logged in to leave comments.
Login now