summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gbp/log.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gbp/log.py b/gbp/log.py
index a508b677..7b9a4aa8 100644
--- a/gbp/log.py
+++ b/gbp/log.py
@@ -176,7 +176,7 @@ def getLogger(*args, **kwargs):
logging.setLoggerClass(GbpLogger)
color = kwargs.pop('color') if 'color' in kwargs else 'auto'
logger = logging.getLogger(*args, **kwargs)
- if not logger.default_handlers:
+ if hasattr(logger, 'default_handlers') and not logger.default_handlers:
logger.init_default_handlers(color)
return logger