Commit c2130b92 authored by Tim Peters's avatar Tim Peters

LOL - 2.7 requires very different code. Annoying ;-)

parent a81d9e77
...@@ -531,11 +531,11 @@ class _BoundedSemaphore(_Semaphore): ...@@ -531,11 +531,11 @@ class _BoundedSemaphore(_Semaphore):
raise a ValueError. raise a ValueError.
""" """
with self._cond: with self._Semaphore__cond:
if self._value >= self._initial_value: if self._Semaphore__value >= self._initial_value:
raise ValueError("Semaphore released too many times") raise ValueError("Semaphore released too many times")
self._value += 1 self._Semaphore__value += 1
self._cond.notify() self._Semaphore__cond.notify()
def Event(*args, **kwargs): def Event(*args, **kwargs):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment