Fix resource leak reported in SF #1516995.

This commit is contained in:
Vinay Sajip 2007-03-11 18:32:07 +00:00
parent 2faa9e1466
commit a5e764873a
1 changed files with 2 additions and 0 deletions

View 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: