MCPcopy Index your code
hub / github.com/RustPython/RustPython / _check_timeout

Method _check_timeout

Lib/subprocess.py:1261–1270  ·  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

1259
1260
1261 def _check_timeout(self, endtime, orig_timeout, stdout_seq, stderr_seq,
1262 skip_check_and_raise=False):
1263 """Convenience for checking if a timeout has expired."""
1264 if endtime is None:
1265 return
1266 if skip_check_and_raise or _time() > endtime:
1267 raise TimeoutExpired(
1268 self.args, orig_timeout,
1269 output=b''.join(stdout_seq) if stdout_seq else None,
1270 stderr=b''.join(stderr_seq) if stderr_seq else None)
1271
1272
1273 def wait(self, timeout=None):

Callers 1

_communicateMethod · 0.95

Calls 3

_timeFunction · 0.90
TimeoutExpiredClass · 0.85
joinMethod · 0.45

Tested by

no test coverage detected