Issue #8581: logging: removed errors raised when closing handlers twice.

This commit is contained in:
Vinay Sajip 2010-05-03 15:39:57 +00:00
parent 350c394c87
commit c7cbb9b509
2 changed files with 6 additions and 2 deletions

View File

@ -702,7 +702,9 @@ 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...
if self in _handlers:
del _handlers[self]
if self in _handlerList:
_handlerList.remove(self)
finally:
_releaseLock()

View File

@ -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.