diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2007-03-11 18:37:20 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2007-03-11 18:37:20 (GMT) |
commit | fbf1f3e6026b3b0c96a489ad3d94fcc4df0a4832 (patch) | |
tree | 47a52b76e0d7a85ac333ab7411eecfaec6fba24f /Lib | |
parent | 3e43bcc78e2716eda822eab3cd08da206b0b8f35 (diff) | |
download | cpython-fbf1f3e6026b3b0c96a489ad3d94fcc4df0a4832.zip cpython-fbf1f3e6026b3b0c96a489ad3d94fcc4df0a4832.tar.gz cpython-fbf1f3e6026b3b0c96a489ad3d94fcc4df0a4832.tar.bz2 |
Fix resource leak reported in SF #1516995.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_logging.py | 2 |
1 files changed, 2 insertions, 0 deletions
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: |