diff options
Diffstat (limited to 'Lib/logging/__init__.py')
-rw-r--r-- | Lib/logging/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index 5a0b0f5..9fa8797 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -671,7 +671,8 @@ 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] + if _handlers.has_key(self): + del _handlers[self] _handlerList.remove(self) finally: _releaseLock() |