mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
Fix resource leak reported in SF #1516995.
This commit is contained in:
parent
2faa9e1466
commit
a5e764873a
1 changed files with 2 additions and 0 deletions
|
|
@ -555,6 +555,8 @@ def test5():
|
||||||
except KeyError:
|
except KeyError:
|
||||||
logging.exception("just testing")
|
logging.exception("just testing")
|
||||||
os.remove(fn)
|
os.remove(fn)
|
||||||
|
hdlr = logging.getLogger().handlers[0]
|
||||||
|
logging.getLogger().handlers.remove(hdlr)
|
||||||
finally:
|
finally:
|
||||||
logging._acquireLock()
|
logging._acquireLock()
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue