Removed an unnecessary check

This commit is contained in:
Armin Ronacher 2013-05-20 02:12:34 +01:00
parent ce779a585f
commit eb12114219

View File

@ -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):