summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gbp/log.py4
-rw-r--r--gbp/rpm/lib_rpm.py1
2 files changed, 3 insertions, 2 deletions
diff --git a/gbp/log.py b/gbp/log.py
index 5f8ae107..7b9a4aa8 100644
--- a/gbp/log.py
+++ b/gbp/log.py
@@ -172,8 +172,8 @@ def _parse_color_scheme(color_scheme=""):
def getLogger(*args, **kwargs):
"""Gbp-specific function"""
-# if not issubclass(logging.getLoggerClass(), GbpLogger):
- logging.setLoggerClass(GbpLogger)
+ if not issubclass(logging.getLoggerClass(), GbpLogger):
+ logging.setLoggerClass(GbpLogger)
color = kwargs.pop('color') if 'color' in kwargs else 'auto'
logger = logging.getLogger(*args, **kwargs)
if hasattr(logger, 'default_handlers') and not logger.default_handlers:
diff --git a/gbp/rpm/lib_rpm.py b/gbp/rpm/lib_rpm.py
index 4bad44e7..da914207 100644
--- a/gbp/rpm/lib_rpm.py
+++ b/gbp/rpm/lib_rpm.py
@@ -25,6 +25,7 @@ try:
# Try to load special RPM lib to be used for GBP (only)
librpm = __import__(RpmPkgPolicy.python_rpmlib_module_name)
except ImportError:
+ gbp.log.getLogger("gbp")
gbp.log.warn("Failed to import '%s' as rpm python module, using host's "
"default rpm library instead" %
RpmPkgPolicy.python_rpmlib_module_name)