diff options
author | Richard Oudkerk <shibturn@gmail.com> | 2012-06-04 17:59:07 (GMT) |
---|---|---|
committer | Richard Oudkerk <shibturn@gmail.com> | 2012-06-04 17:59:07 (GMT) |
commit | 86eb7e97aeb8dbd9589d2d300f7d139be4f20663 (patch) | |
tree | 786ae3457296df1b4e67b38bad7cc402e65aa5b0 /Lib/multiprocessing/synchronize.py | |
parent | ad06444d6c52e614a65ee126bc4c916da0c2c57e (diff) | |
download | cpython-86eb7e97aeb8dbd9589d2d300f7d139be4f20663.zip cpython-86eb7e97aeb8dbd9589d2d300f7d139be4f20663.tar.gz cpython-86eb7e97aeb8dbd9589d2d300f7d139be4f20663.tar.bz2 |
Fix potential NameError in multiprocessing.Condition.wait()
Diffstat (limited to 'Lib/multiprocessing/synchronize.py')
-rw-r--r-- | Lib/multiprocessing/synchronize.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/multiprocessing/synchronize.py b/Lib/multiprocessing/synchronize.py index 2c413a9..4502a97 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' |