diff options
-rw-r--r-- | lib/bb/msg.py | 11 | ||||
-rw-r--r-- | lib/bb/ui/knotty.py | 2 |
2 files changed, 1 insertions, 12 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() diff --git a/lib/bb/ui/knotty.py b/lib/bb/ui/knotty.py index 826aa8c3e..87e873d64 100644 --- a/lib/bb/ui/knotty.py +++ b/lib/bb/ui/knotty.py @@ -871,6 +871,6 @@ def main(server, eventHandler, params, tf = TerminalFilter): if e.errno == errno.EPIPE: pass - bb.msg.cleanupLogging() + logging.shutdown() return return_value |