MCPcopy Create free account
hub / github.com/tox-dev/filelock / _release

Method _release

src/filelock/_soft.py:37–42  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

35 self._context.lock_file_fd = file_handler
36
37 def _release(self) -> None:
38 assert self._context.lock_file_fd is not None # noqa: S101
39 os.close(self._context.lock_file_fd) # the lock file is definitely not None
40 self._context.lock_file_fd = None
41 with suppress(OSError): # the file is already deleted and that's what we want
42 Path(self.lock_file).unlink()
43
44
45__all__ = [

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected