From: Armin Ronacher Date: Mon, 20 May 2013 01:12:34 +0000 (+0100) Subject: Removed an unnecessary check X-Git-Tag: 2.7~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb1211421915b0c3d9973b387603f999ded34037;p=thirdparty%2Fjinja.git Removed an unnecessary check --- diff --git a/jinja2/runtime.py b/jinja2/runtime.py index 14162e67..71485c8f 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):