From 86eb7e97aeb8dbd9589d2d300f7d139be4f20663 Mon Sep 17 00:00:00 2001 From: Richard Oudkerk Date: Mon, 4 Jun 2012 18:59:07 +0100 Subject: [PATCH] Fix potential NameError in multiprocessing.Condition.wait() --- Lib/multiprocessing/synchronize.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Lib/multiprocessing/synchronize.py b/Lib/multiprocessing/synchronize.py index 2c413a9b61a..4502a97e99a 100644 --- a/Lib/multiprocessing/synchronize.py +++ b/Lib/multiprocessing/synchronize.py @@ -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'