]> granicus.if.org Git - python/commitdiff
Fix potential NameError in multiprocessing.Condition.wait()
authorRichard Oudkerk <shibturn@gmail.com>
Mon, 4 Jun 2012 17:59:07 +0000 (18:59 +0100)
committerRichard Oudkerk <shibturn@gmail.com>
Mon, 4 Jun 2012 17:59:07 +0000 (18:59 +0100)
Lib/multiprocessing/synchronize.py

index 2c413a9b61ae1e48dd07898c87c5582f430525fa..4502a97e99ac371f11153d85987b679ea11821a1 100644 (file)
@@ -216,7 +216,7 @@ class Condition(object):
 
         try:
             # wait for notification or timeout
-            ret = self._wait_semaphore.acquire(True, timeout)
+            return self._wait_semaphore.acquire(True, timeout)
         finally:
             # indicate that this thread has woken
             self._woken_count.release()
@@ -224,7 +224,6 @@ class Condition(object):
             # reacquire lock
             for i in range(count):
                 self._lock.acquire()
-            return ret
 
     def notify(self):
         assert self._lock._semlock._is_mine(), 'lock is not owned'