(self)
| 114 | time.sleep(wait) |
| 115 | |
| 116 | def release(self): |
| 117 | if not self.is_locked(): |
| 118 | raise NotLocked("%s is not locked" % self.path) |
| 119 | if not self.i_am_locking(): |
| 120 | raise NotMyLock("%s is locked, but not by me (by %s)" % |
| 121 | (self.unique_name, self._who_is_locking())) |
| 122 | cursor = self.connection.cursor() |
| 123 | cursor.execute("delete from locks" |
| 124 | " where unique_name = ?", |
| 125 | (self.unique_name,)) |
| 126 | self.connection.commit() |
| 127 | |
| 128 | def _who_is_locking(self): |
| 129 | cursor = self.connection.cursor() |
nothing calls this directly
no test coverage detected