summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/logging/__init__.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py
index cee5fa2..4dab918 100644
--- a/Lib/logging/__init__.py
+++ b/Lib/logging/__init__.py
@@ -1090,7 +1090,11 @@ class Logger(Filterer):
"""
if hdlr in self.handlers:
#hdlr.close()
- self.handlers.remove(hdlr)
+ hdlr.acquire()
+ try:
+ self.handlers.remove(hdlr)
+ finally:
+ hdlr.release()
def callHandlers(self, record):
"""