Get rid of the lock by deleting the lockfile. When working in a `with` statement, this gets automatically called at the end.
(self)
| 259 | self.is_locked = True |
| 260 | |
| 261 | def release(self): |
| 262 | """ Get rid of the lock by deleting the lockfile. |
| 263 | When working in a `with` statement, this gets automatically |
| 264 | called at the end. |
| 265 | """ |
| 266 | if self.is_locked: |
| 267 | os.close(self.fd) |
| 268 | os.unlink(self.lockfile) |
| 269 | self.is_locked = False |
| 270 | |
| 271 | def __enter__(self): |
| 272 | """ Activated when used in the with statement. |
no test coverage detected