bpo-37531: sync regrtest with master branch (GH-16285)

This commit is contained in:
Victor Stinner 2019-09-19 18:05:09 +02:00 committed by GitHub
parent 8d9efc4a27
commit fb7746d5d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 17 deletions

View file

@ -185,14 +185,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()