Commit 5cd466a6 by Paul Bonser Committed by Chris Wanstrath

an object can have a __call__ attribute and not actually be callable

parent 3bcd6b63
......@@ -80,7 +80,7 @@ class Template(object):
it = get_or_attr(context, section_name, None)
replacer = ''
if it and hasattr(it, '__call__'):
if it and callable(it):
replacer = it(inner)
elif it and not hasattr(it, '__iter__'):
if section[2] != '^':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment