From fbf1f3e6026b3b0c96a489ad3d94fcc4df0a4832 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Sun, 11 Mar 2007 18:37:20 +0000 Subject: Fix resource leak reported in SF #1516995. --- Lib/test/test_logging.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index ee34f8c..d96d703 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -555,6 +555,8 @@ def test5(): except KeyError: logging.exception("just testing") os.remove(fn) + hdlr = logging.getLogger().handlers[0] + logging.getLogger().handlers.remove(hdlr) finally: logging._acquireLock() try: -- cgit v0.12