commit | 116f16e4ab9a7cc319ca42ae24221d203d0d8f26 | [log] [tgz] |
---|---|---|
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | Fri Sep 16 10:33:40 2005 +0000 |
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | Fri Sep 16 10:33:40 2005 +0000 |
tree | d92488708e9a3fe6430021ab60b165653f761424 | |
parent | 9bda1d6f645bd0f3e76c14f27bbbac919814cd38 [diff] |
Added lock acquisition around handler removal from logger
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 @@ """ 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): """