The taskflow logger module does not provide a logging adapter
The expected use is that this comparison check for older versions of python (only 2.6) should check against the logging modules logger adapter type and not the taskflow modules helper logger module which does not expose this type. Fixes bug 1409178 Change-Id: I94077bf76d9f13728c6c14b5e263bc7ced3ab0e8
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import logging as logging_base
|
||||
import sys
|
||||
|
||||
from taskflow.listeners import base
|
||||
@@ -36,7 +37,7 @@ else:
|
||||
# when we can just support python 2.7+ (which fixed the lack of this method
|
||||
# on adapters).
|
||||
def _isEnabledFor(logger, level):
|
||||
if _PY26 and isinstance(logger, logging.LoggerAdapter):
|
||||
if _PY26 and isinstance(logger, logging_base.LoggerAdapter):
|
||||
return logger.logger.isEnabledFor(level)
|
||||
return logger.isEnabledFor(level)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user