| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3e99cc5 commit 4e61156
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -53,6 +53,7 @@ def release(self): | |||
| 53 | 53 | ||
| 54 | 54 | def __enter__(self): | |
| 55 | 55 | self.acquire() | |
| 56 | + return self | ||
| 56 | 57 | ||
| 57 | 58 | def __exit__(self, *args): | |
| 58 | 59 | if self.locked: | |
@@ -81,7 +82,6 @@ def acquire(self): | |||
| 81 | 82 | except IOError as e: | |
| 82 | 83 | if e.errno != errno.ENOLCK: | |
| 83 | 84 | raise e | |
| 84 | - return self | ||
| 85 | 85 | ||
| 86 | 86 | def release(self): | |
| 87 | 87 | fcntl.flock(self.fd, fcntl.LOCK_UN) | |
@@ -98,7 +98,6 @@ def __init__(self, fd, mode=None): | |||
| 98 | 98 | def acquire(self): | |
| 99 | 99 | msvcrt.locking(self.fd, msvcrt.LK_NBLCK, 1) | |
| 100 | 100 | self.locked = True | |
| 101 | - return self | ||
| 102 | 101 | ||
| 103 | 102 | def release(self): | |
| 104 | 103 | msvcrt.locking(self.fd, msvcrt.LK_UNLCK, 1) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments