From: Vinay Sajip Date: Sun, 11 Mar 2007 18:32:07 +0000 (+0000) Subject: Fix resource leak reported in SF #1516995. X-Git-Tag: v2.6a1~2050 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a5e764873a3e9ec80eea0517ee735d44031e713a;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: