disable callable replacement which isn't supported on older pythons

This commit is contained in:
Damien Elmes 2011-01-20 05:30:13 +09:00
parent f945e60d6d
commit 0e08092f65

View file

@ -81,9 +81,9 @@ class Template(object):
it = get_or_attr(context, section_name, None)
replacer = ''
if it and isinstance(it, collections.Callable):
replacer = it(inner)
elif it and not hasattr(it, '__iter__'):
# if it and isinstance(it, collections.Callable):
# replacer = it(inner)
if it and not hasattr(it, '__iter__'):
if section[2] != '^':
replacer = inner
elif it and hasattr(it, 'keys') and hasattr(it, '__getitem__'):