Show More
@@ -22,6 +22,11 b' class remotelock(object):' | |||
|
22 | 22 | def release(self): |
|
23 | 23 | self.repo.unlock() |
|
24 | 24 | self.repo = None |
|
25 | def __enter__(self): | |
|
26 | return self | |
|
27 | def __exit__(self, exc_type, exc_val, exc_tb): | |
|
28 | if self.repo: | |
|
29 | self.release() | |
|
25 | 30 | def __del__(self): |
|
26 | 31 | if self.repo: |
|
27 | 32 | self.release() |
General Comments 0
You need to be logged in to leave comments.
Login now