diff options
author | Joshua Watt <jpewhacker@gmail.com> | 2020-03-12 13:30:04 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-03-12 23:03:37 +0000 |
commit | 970cd2fc4f0bbc93069dee5a15a608dd76081c67 (patch) | |
tree | c279fdfec5928dda62341a0cc4e29f8ffe552de4 /lib/bb/msg.py | |
parent | 2010be588c74a99256df7b565a309c84c2973546 (diff) | |
download | bitbake-970cd2fc4f0bbc93069dee5a15a608dd76081c67.tar.gz |
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
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/msg.py')
-rw-r--r-- | lib/bb/msg.py | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/bb/msg.py b/lib/bb/msg.py index 2ba482422..c0b344e32 100644 --- a/lib/bb/msg.py +++ b/lib/bb/msg.py @@ -330,14 +330,3 @@ def setLoggingConfig(defaultconfig, userconfigfile=None): # bb.msg.loggerDefaultLogLevel = newlevel return conf - -def cleanupLogging(): - # Iterate through all the handlers and close them if possible. Fixes - # 'Unclosed resource' warnings when bitbake exits, see - # https://bugs.python.org/issue23010 - handlers = set() - for logger_iter in logging.Logger.manager.loggerDict.keys(): - handlers.update(logging.getLogger(logger_iter).handlers) - - for h in handlers: - h.close() |