Commit 767434c3 authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

bpo-37531: Fix regrtest _timedout() function on timeout (GH-15419)

Fix code handling TimeoutExpired exception in _timedout().
parent c4868250
......@@ -184,14 +184,14 @@ class MultiprocessThread(threading.Thread):
def _timedout(self, test_name):
self._kill()
stdout = sterr = ''
stdout = stderr = ''
popen = self._popen
try:
stdout, stderr = popen.communicate(timeout=JOIN_TIMEOUT)
except (subprocess.TimeoutExpired, OSError) as exc:
print("WARNING: Failed to read worker process %s output "
"(timeout=%.1f sec): %r"
% (popen.pid, exc, timeout),
% (popen.pid, JOIN_TIMEOUT, exc),
file=sys.stderr, flush=True)
self._close_wait()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment