From: Vinay Sajip Date: Sun, 11 Mar 2007 18:37:20 +0000 (+0000) Subject: Fix resource leak reported in SF #1516995. X-Git-Tag: v2.5.1c1~58 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fbf1f3e6026b3b0c96a489ad3d94fcc4df0a4832;p=thirdparty%2FPython%2Fcpython.git Fix resource leak reported in SF #1516995. --- diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index ee34f8c1baa2..d96d703e1d4c 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: