parent
4df19233c9
commit
67126732e2
|
@ -255,7 +255,7 @@ def decorator(wrapper=None, enabled=None, adapter=None):
|
|||
# we need to first check that use of the decorator
|
||||
# hadn't been disabled by a simple boolean. If it was,
|
||||
# the target function to be wrapped is returned instead.
|
||||
|
||||
|
||||
_enabled = enabled
|
||||
if type(_enabled) is bool:
|
||||
if not _enabled:
|
||||
|
|
|
@ -9,7 +9,7 @@ import threading
|
|||
PY2 = sys.version_info[0] == 2
|
||||
PY3 = sys.version_info[0] == 3
|
||||
|
||||
if PY3:
|
||||
if PY3:
|
||||
import importlib
|
||||
string_types = str,
|
||||
else:
|
||||
|
|
|
@ -418,7 +418,7 @@ class CallableObjectProxy(ObjectProxy):
|
|||
class _FunctionWrapperBase(ObjectProxy):
|
||||
|
||||
__slots__ = ('_self_instance', '_self_wrapper', '_self_enabled',
|
||||
'_self_binding', '_self_parent')
|
||||
'_self_binding', '_self_parent')
|
||||
|
||||
def __init__(self, wrapped, instance, wrapper, enabled=None,
|
||||
binding='function', parent=None):
|
||||
|
|
Loading…
Reference in New Issue