def _require_client_lock(self, client_name): if not self.got_client_lock(client_name): raise obnamlib.RepositoryClientNotLocked(client_name=client_name)
def _require_lock(self): if not self._lock.got_lock: raise obnamlib.RepositoryClientNotLocked( client_name=self._client_name)
def _require_lock(self): if not self.data.locked: raise obnamlib.RepositoryClientNotLocked(client_name=self.name)
def unlock(self): if not self._lock.got_lock: raise obnamlib.RepositoryClientNotLocked() self._data.clear() self._lock.unchecked_unlock()