mirror of https://github.com/celery/kombu.git
LogWrapped should ignore __enter__, __exit__
This commit is contained in:
parent
b86c129a82
commit
df0c67feb0
|
@ -14,6 +14,7 @@ def setup_logging(loglevel=logging.DEBUG, loggers=["kombu.connection",
|
|||
|
||||
|
||||
class Logwrapped(object):
|
||||
__ignore = ("__enter__", "__exit__")
|
||||
|
||||
def __init__(self, instance, logger=None, ident=None):
|
||||
self.instance = instance
|
||||
|
@ -23,7 +24,7 @@ class Logwrapped(object):
|
|||
def __getattr__(self, key):
|
||||
meth = getattr(self.instance, key)
|
||||
|
||||
if not callable(meth):
|
||||
if not callable(meth) or key in self.__ignore:
|
||||
return meth
|
||||
|
||||
@wraps(meth)
|
||||
|
|
Loading…
Reference in New Issue