]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Reverted back to r67866.
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Thu, 28 Jan 2010 00:06:57 +0000 (00:06 +0000)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Thu, 28 Jan 2010 00:06:57 +0000 (00:06 +0000)
Lib/logging/__init__.py
Misc/NEWS

index 89bb9f2bbeeea10e3a81f19665758ab0573e2976..07f1add37ace601f1bd6c84d1f777efc17b6f691 100644 (file)
@@ -166,10 +166,7 @@ def addLevelName(level, levelName):
 #the lock would already have been acquired - so we need an RLock.
 #The same argument applies to Loggers and Manager.loggerDict.
 #
-if thread:
-    _lock = threading.RLock()
-else:
-    _lock = None
+_lock = None
 
 def _acquireLock():
     """
@@ -177,6 +174,9 @@ def _acquireLock():
 
     This should be released with _releaseLock().
     """
+    global _lock
+    if (not _lock) and thread:
+        _lock = threading.RLock()
     if _lock:
         _lock.acquire()
 
index f7264af721dccb5cbbe8f9027e1c30a50c4bf472..294c53058db77dc4d637cc41b545e1cab7d5edc6 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -9,11 +9,6 @@ hat's New in Python 2.4.7?
 
 *Release date: XX-XXX-2009*
 
-Library
--------
-
-- Issue #7403: logging: Fixed possible race condition in lock creation.
-
 
 What's New in Python 2.4.6?
 ===========================