Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed an unnecessary check

  • Loading branch information...
commit eb1211421915b0c3d9973b387603f999ded34037 1 parent ce779a5
@mitsuhiko authored
Showing with 7 additions and 8 deletions.
  1. +7 −8 jinja2/runtime.py
View
15 jinja2/runtime.py
@@ -174,14 +174,13 @@ def call(__self, __obj, *args, **kwargs):
__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):
Please sign in to comment.
Something went wrong with that request. Please try again.