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

Method __exit__

src/filelock/_api.py:954–961  ·  view source on GitHub ↗

Release the lock, reconciling a release failure with any body failure per :attr:`context_error_policy`.

(
        self,
        exc_type: type[BaseException] | None,
        exc_value: BaseException | None,
        traceback: TracebackType | None,
    )

Source from the content-addressed store, hash-verified

952 return self
953
954 def __exit__(
955 self,
956 exc_type: type[BaseException] | None,
957 exc_value: BaseException | None,
958 traceback: TracebackType | None,
959 ) -> None:
960 """Release the lock, reconciling a release failure with any body failure per :attr:`context_error_policy`."""
961 self._release_in_context(exc_value)
962
963 def _release_in_context(self, body_error: BaseException | None) -> None:
964 # Release from a context-manager exit. "chain" lets a release failure propagate with the body error already in

Callers 2

_run_child_cleanupFunction · 0.45

Calls 1

_release_in_contextMethod · 0.95

Tested by 2

_run_child_cleanupFunction · 0.36