summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_logging.py
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2007-03-11 18:32:07 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2007-03-11 18:32:07 (GMT)
commita5e764873a3e9ec80eea0517ee735d44031e713a (patch)
tree3dbd0cea4ecb1d66b65ea6031e3d342fcb2a78c6 /Lib/test/test_logging.py
parent2faa9e146681bb4d5ea2b795dfaade35a1d1c2df (diff)
downloadcpython-a5e764873a3e9ec80eea0517ee735d44031e713a.zip
cpython-a5e764873a3e9ec80eea0517ee735d44031e713a.tar.gz
cpython-a5e764873a3e9ec80eea0517ee735d44031e713a.tar.bz2
Fix resource leak reported in SF #1516995.
Diffstat (limited to 'Lib/test/test_logging.py')
-rw-r--r--Lib/test/test_logging.py2
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: