summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/msg.py
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2020-03-12 13:30:04 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-03-13 11:29:23 +0000
commitbf7d68c812e9807d88b529212487dda7fa60245a (patch)
tree241d366151d904f55cb75cc4626748000b17e3d1 /bitbake/lib/bb/msg.py
parent5ce50b3ce7ba91b9e34a9ce8f17b4ff43a8c73e6 (diff)
downloadpoky-bf7d68c812e9807d88b529212487dda7fa60245a.tar.gz
bitbake: knotty/msg: Use logging.shutdown() instead of bb.msg.cleanupLogging()
The logging module provides a shutdown() function that does the same thing in a much better way (Bitbake rev: 970cd2fc4f0bbc93069dee5a15a608dd76081c67) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/msg.py')
-rw-r--r--bitbake/lib/bb/msg.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/bitbake/lib/bb/msg.py b/bitbake/lib/bb/msg.py
index 2ba4824227..c0b344e323 100644
--- a/bitbake/lib/bb/msg.py
+++ b/bitbake/lib/bb/msg.py
@@ -330,14 +330,3 @@ def setLoggingConfig(defaultconfig, userconfigfile=None):
330 # bb.msg.loggerDefaultLogLevel = newlevel 330 # bb.msg.loggerDefaultLogLevel = newlevel
331 331
332 return conf 332 return conf
333
334def cleanupLogging():
335 # Iterate through all the handlers and close them if possible. Fixes
336 # 'Unclosed resource' warnings when bitbake exits, see
337 # https://bugs.python.org/issue23010
338 handlers = set()
339 for logger_iter in logging.Logger.manager.loggerDict.keys():
340 handlers.update(logging.getLogger(logger_iter).handlers)
341
342 for h in handlers:
343 h.close()