Show More
@@ -22,6 +22,11 b' class remotelock(object):' | |||||
22 | def release(self): |
|
22 | def release(self): | |
23 | self.repo.unlock() |
|
23 | self.repo.unlock() | |
24 | self.repo = None |
|
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 | def __del__(self): |
|
30 | def __del__(self): | |
26 | if self.repo: |
|
31 | if self.repo: | |
27 | self.release() |
|
32 | self.release() |
General Comments 0
You need to be logged in to leave comments.
Login now