[elbe-devel] [PATCH v2 10/27] log: call close() on log handlers that are removed
Torben Hohn
torben.hohn at linutronix.de
Thu Sep 24 16:56:07 CEST 2020
python3 now complains about files being closed during garbagecollection.
Call close() on loghandlers when they are removed.
Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
elbepack/log.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/elbepack/log.py b/elbepack/log.py
index 2ef144c7a..22f747dab 100644
--- a/elbepack/log.py
+++ b/elbepack/log.py
@@ -214,6 +214,7 @@ def close_logging():
if hasattr(local, "handlers"):
for h in local.handlers:
root.removeHandler(h)
+ h.close()
local.handlers = []
# TODO:py3 Remove object inheritance
--
2.20.1
More information about the elbe-devel
mailing list