summaryrefslogtreecommitdiff
path: root/jinja2/runtime.py
diff options
context:
space:
mode:
Diffstat (limited to 'jinja2/runtime.py')
-rw-r--r--jinja2/runtime.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/jinja2/runtime.py b/jinja2/runtime.py
index 14162e6..71485c8 100644
--- a/jinja2/runtime.py
+++ b/jinja2/runtime.py
@@ -174,14 +174,13 @@ class Context(object):
__traceback_hide__ = True
# Allow callable classes to take a context
- if hasattr(__obj, '__call__'):
- fn = __obj.__call__
- for fn_type in ('contextfunction',
- 'evalcontextfunction',
- 'environmentfunction'):
- if hasattr(fn, fn_type):
- __obj = fn
- break
+ fn = __obj.__call__
+ for fn_type in ('contextfunction',
+ 'evalcontextfunction',
+ 'environmentfunction'):
+ if hasattr(fn, fn_type):
+ __obj = fn
+ break
if isinstance(__obj, _context_function_types):
if getattr(__obj, 'contextfunction', 0):