MCPcopy Index your code
hub / github.com/python/cpython / _insert_timeout_error

Method _insert_timeout_error

Lib/asyncio/timeouts.py:133–140  ·  view source on GitHub ↗
(exc_val: BaseException)

Source from the content-addressed store, hash-verified

131
132 @staticmethod
133 def _insert_timeout_error(exc_val: BaseException) -> None:
134 while exc_val.__context__ is not None:
135 if isinstance(exc_val.__context__, exceptions.CancelledError):
136 te = TimeoutError()
137 te.__context__ = te.__cause__ = exc_val.__context__
138 exc_val.__context__ = te
139 break
140 exc_val = exc_val.__context__
141
142
143def timeout(delay: float | None) -> Timeout:

Callers 1

__aexit__Method · 0.95

Calls 1

TimeoutErrorClass · 0.85

Tested by

no test coverage detected