summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Ronacher <armin.ronacher@active-4.com>2013-05-20 02:12:34 +0100
committerArmin Ronacher <armin.ronacher@active-4.com>2013-05-20 02:12:34 +0100
commiteb1211421915b0c3d9973b387603f999ded34037 (patch)
tree8eafb65a478570f41f1b320090c616b8dbb04973
parentce779a585f77518a7f55c9a5a1aad1e585858865 (diff)
downloadjinja2-eb1211421915b0c3d9973b387603f999ded34037.tar.gz
Removed an unnecessary check
-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):