From: Tim Peters Date: Wed, 9 Oct 2013 02:51:06 +0000 (-0500) Subject: LOL - 2.7 requires very different code. Annoying ;-) X-Git-Tag: v2.7.6rc1~57 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b563d4b7c8594f6b814f418c97d6774d5a8a5ef0;p=python LOL - 2.7 requires very different code. Annoying ;-) --- diff --git a/Lib/threading.py b/Lib/threading.py index 167f8c7fe3..e81471bbb0 100644 --- a/Lib/threading.py +++ b/Lib/threading.py @@ -531,11 +531,11 @@ class _BoundedSemaphore(_Semaphore): raise a ValueError. """ - with self._cond: - if self._value >= self._initial_value: + with self._Semaphore__cond: + if self._Semaphore__value >= self._initial_value: raise ValueError("Semaphore released too many times") - self._value += 1 - self._cond.notify() + self._Semaphore__value += 1 + self._Semaphore__cond.notify() def Event(*args, **kwargs):