From: Nick Coghlan Date: Tue, 31 Jul 2007 13:38:01 +0000 (+0000) Subject: Eliminate RLock race condition reported in SF bug #1764059 X-Git-Tag: v2.6a1~1529 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f8bbaa962f95b8ebb16cd95c52de2d2c8d9261e7;p=python Eliminate RLock race condition reported in SF bug #1764059 --- diff --git a/Lib/threading.py b/Lib/threading.py index a46090d6b2..5fc149dc33 100644 --- a/Lib/threading.py +++ b/Lib/threading.py @@ -85,9 +85,10 @@ class _RLock(_Verbose): self.__count = 0 def __repr__(self): + owner = self.__owner return "<%s(%s, %d)>" % ( self.__class__.__name__, - self.__owner and self.__owner.getName(), + owner and owner.getName(), self.__count) def acquire(self, blocking=1):