[Python-checkins] r85013 - in python/branches: py3k/Lib/logging/config.py py3k/Misc/NEWS release27-maint/Lib/logging/config.py release27-maint/Misc/NEWS
vinay.sajip
python-checkins at python.org
Sat Sep 25 19:48:26 CEST 2010
Author: vinay.sajip
Date: Sat Sep 25 19:48:25 2010
New Revision: 85013
Log:
Issue #9947: logging: Fixed locking bug in stopListening.
Modified:
python/branches/py3k/Lib/logging/config.py
python/branches/py3k/Misc/NEWS
python/branches/release27-maint/Lib/logging/config.py
python/branches/release27-maint/Misc/NEWS
Modified: python/branches/py3k/Lib/logging/config.py
==============================================================================
--- python/branches/py3k/Lib/logging/config.py (original)
+++ python/branches/py3k/Lib/logging/config.py Sat Sep 25 19:48:25 2010
@@ -917,8 +917,10 @@
Stop the listening server which was created with a call to listen().
"""
global _listener
- if _listener:
- logging._acquireLock()
- _listener.abort = 1
- _listener = None
+ logging._acquireLock()
+ try:
+ if _listener:
+ _listener.abort = 1
+ _listener = None
+ finally:
logging._releaseLock()
Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS (original)
+++ python/branches/py3k/Misc/NEWS Sat Sep 25 19:48:25 2010
@@ -68,6 +68,8 @@
Library
-------
+- Issue #9947: logging: Fixed locking bug in stopListening.
+
- Issue #9945: logging: Fixed locking bugs in addHandler/removeHandler.
- Issue #9936: Fixed executable lines' search in the trace module.
Modified: python/branches/release27-maint/Lib/logging/config.py
==============================================================================
--- python/branches/release27-maint/Lib/logging/config.py (original)
+++ python/branches/release27-maint/Lib/logging/config.py Sat Sep 25 19:48:25 2010
@@ -895,8 +895,10 @@
Stop the listening server which was created with a call to listen().
"""
global _listener
- if _listener:
- logging._acquireLock()
- _listener.abort = 1
- _listener = None
+ logging._acquireLock()
+ try:
+ if _listener:
+ _listener.abort = 1
+ _listener = None
+ finally:
logging._releaseLock()
Modified: python/branches/release27-maint/Misc/NEWS
==============================================================================
--- python/branches/release27-maint/Misc/NEWS (original)
+++ python/branches/release27-maint/Misc/NEWS Sat Sep 25 19:48:25 2010
@@ -43,6 +43,8 @@
Library
-------
+- Issue #9947: logging: Fixed locking bug in stopListening.
+
- Issue #9945: logging: Fixed locking bugs in addHandler/removeHandler.
- Issue #9936: Fixed executable lines' search in the trace module.
More information about the Python-checkins
mailing list