MCPcopy Create free account
hub / github.com/ColdGrub1384/Pyto / release

Method release

site-packages/lockfile/sqlitelockfile.py:116–126  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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()

Callers

nothing calls this directly

Calls 7

is_lockedMethod · 0.95
i_am_lockingMethod · 0.95
_who_is_lockingMethod · 0.95
NotLockedClass · 0.70
NotMyLockClass · 0.70
executeMethod · 0.45
commitMethod · 0.45

Tested by

no test coverage detected