• Guido van Rossum's avatar
    Change the idiom: · a702ae71
    Guido van Rossum authored
        try:
            self.lock.acquire()
            ...
        finally:
            self.lock.release()
    
    into:
    
        self.lock.acquire()
        try:
            ...
        finally:
            self.lock.release()
    
    The old version would mistakenly try to release the lock if there was
    error in acquiring it.
    a702ae71
trigger.py 6.71 KB