mirror of
https://github.com/python/cpython.git
synced 2025-10-02 05:12:23 +00:00
Issue #8581: logging: removed errors raised when closing handlers twice.
This commit is contained in:
parent
350c394c87
commit
c7cbb9b509
2 changed files with 6 additions and 2 deletions
|
@ -702,8 +702,10 @@ class Handler(Filterer):
|
|||
#get the module data lock, as we're updating a shared structure.
|
||||
_acquireLock()
|
||||
try: #unlikely to raise an exception, but you never know...
|
||||
del _handlers[self]
|
||||
_handlerList.remove(self)
|
||||
if self in _handlers:
|
||||
del _handlers[self]
|
||||
if self in _handlerList:
|
||||
_handlerList.remove(self)
|
||||
finally:
|
||||
_releaseLock()
|
||||
|
||||
|
|
|
@ -33,6 +33,8 @@ Core and Builtins
|
|||
Library
|
||||
-------
|
||||
|
||||
- Issue #8581: logging: removed errors raised when closing handlers twice.
|
||||
|
||||
- Issue #4687: Fix accuracy of garbage collection runtimes displayed with
|
||||
gc.DEBUG_STATS.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue