Skip to content

Commit

Permalink
an object can have a __call__ attribute and not actually be callable
Browse files Browse the repository at this point in the history
  • Loading branch information
pib authored and defunkt committed May 14, 2010
1 parent 3bcd6b6 commit 5cd466a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pystache/template.py
Expand Up @@ -80,7 +80,7 @@ def render_sections(self, template, context):

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] != '^':
Expand Down

0 comments on commit 5cd466a

Please sign in to comment.