summaryrefslogtreecommitdiffstats
path: root/Lib/logging/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/logging/__init__.py')
-rw-r--r--Lib/logging/__init__.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py
index 555f598..7865b71 100644
--- a/Lib/logging/__init__.py
+++ b/Lib/logging/__init__.py
@@ -845,8 +845,9 @@ def _removeHandlerRef(wr):
if acquire and release and handlers:
acquire()
try:
- if wr in handlers:
- handlers.remove(wr)
+ handlers.remove(wr)
+ except ValueError:
+ pass
finally:
release()