mirror of
https://gitee.com/openharmony/third_party_jinja2
synced 2024-11-30 10:51:22 +00:00
Removed an unnecessary check
This commit is contained in:
parent
ce779a585f
commit
eb12114219
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user