]> granicus.if.org Git - python/commitdiff
Fix resource leak reported in SF #1516995.
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Sun, 11 Mar 2007 18:37:20 +0000 (18:37 +0000)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Sun, 11 Mar 2007 18:37:20 +0000 (18:37 +0000)
Lib/test/test_logging.py

index ee34f8c1baa26b94b9cce394c28b63a4671f0fbe..d96d703e1d4c352efbaeb846faba15ff33b85e6b 100644 (file)
@@ -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: