diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-06-11 11:52:24 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-06-11 14:20:25 +0200 |
commit | 583e6a25b0d891a2f531a81029f2bac0c237cbf9 (patch) | |
tree | 09025a39d44fa2a28a6533a0f969316652f974bc /lib/git/async/util.py | |
parent | 01eac1a959c1fa5894a86bf11e6b92f96762bdd8 (diff) | |
parent | 6d1212e8c412b0b4802bc1080d38d54907db879d (diff) | |
download | gitpython-583e6a25b0d891a2f531a81029f2bac0c237cbf9.tar.gz |
Merge branch 'channel' into taskdep
Diffstat (limited to 'lib/git/async/util.py')
-rw-r--r-- | lib/git/async/util.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/git/async/util.py b/lib/git/async/util.py index b7750b0b..11ab75a6 100644 --- a/lib/git/async/util.py +++ b/lib/git/async/util.py @@ -101,10 +101,12 @@ class HSCondition(deque): waiter.acquire() # get it the first time, no blocking self.append(waiter) - # in the momemnt we release our lock, someone else might actually resume - self._lock.release() - try: # restore state no matter what (e.g., KeyboardInterrupt) + + try: + # restore state no matter what (e.g., KeyboardInterrupt) # now we block, as we hold the lock already + # in the momemnt we release our lock, someone else might actually resume + self._lock.release() if timeout is None: waiter.acquire() else: |