aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-11-08 14:03:59 +0000
committerArmin Kuster <akuster808@gmail.com>2017-11-09 12:47:13 -0800
commit555f46994e20faa59d19877961e80eea6e37459f (patch)
tree1e72bf98713ea7ba0065cbe20d14bf0b82b4bec9 /lib
parent3689566bf86cecd78550ae857f68829c5097d589 (diff)
downloadbitbake-contrib-555f46994e20faa59d19877961e80eea6e37459f.tar.gz
event: Ensure we clean up loggers
Whilst we're likely exiting in this case, clean up the loggers we add so that in the case of certain server retries there is no possibility multiple loggers stack up. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 25b7bf6672be66bcbfe5760610dce7d3e866cdcc) Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/bb/event.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/bb/event.py b/lib/bb/event.py
index 526c41f56..52072b580 100644
--- a/lib/bb/event.py
+++ b/lib/bb/event.py
@@ -173,6 +173,10 @@ def print_ui_queue():
for event in ui_queue[:]:
if isinstance(event, logging.LogRecord):
logger.handle(event)
+ if msgerrs:
+ logger.removeHandler(stderr)
+ else:
+ logger.removeHandler(stdout)
def fire_ui_handlers(event, d):
global _thread_lock