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

Method _check_timeout

Lib/subprocess.py:1315–1324  ·  view source on GitHub ↗

Convenience for checking if a timeout has expired.

(self, endtime, orig_timeout, stdout_seq, stderr_seq,
                       skip_check_and_raise=False)

Source from the content-addressed store, hash-verified

1313
1314
1315 def _check_timeout(self, endtime, orig_timeout, stdout_seq, stderr_seq,
1316 skip_check_and_raise=False):
1317 """Convenience for checking if a timeout has expired."""
1318 if endtime is None:
1319 return
1320 if skip_check_and_raise or _time() > endtime:
1321 raise TimeoutExpired(
1322 self.args, orig_timeout,
1323 output=b''.join(stdout_seq) if stdout_seq else None,
1324 stderr=b''.join(stderr_seq) if stderr_seq else None)
1325
1326
1327 def wait(self, timeout=None):

Callers 1

_communicateMethod · 0.95

Calls 2

TimeoutExpiredClass · 0.85
joinMethod · 0.45

Tested by

no test coverage detected