summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-08-23 10:27:24 (GMT)
committerGitHub <noreply@github.com>2019-08-23 10:27:24 (GMT)
commit767434c39c8f3c6a8af1b3282d8382ccf809fe21 (patch)
tree59a9ecd178341d222ab2d402568cd314d18599a9
parentc48682509dc49b43fe914fe6c502bc390345d1c2 (diff)
downloadcpython-767434c39c8f3c6a8af1b3282d8382ccf809fe21.zip
cpython-767434c39c8f3c6a8af1b3282d8382ccf809fe21.tar.gz
cpython-767434c39c8f3c6a8af1b3282d8382ccf809fe21.tar.bz2
bpo-37531: Fix regrtest _timedout() function on timeout (GH-15419)
Fix code handling TimeoutExpired exception in _timedout().
-rw-r--r--Lib/test/libregrtest/runtest_mp.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/libregrtest/runtest_mp.py b/Lib/test/libregrtest/runtest_mp.py
index c22479b..c5ac6e0 100644
--- a/Lib/test/libregrtest/runtest_mp.py
+++ b/Lib/test/libregrtest/runtest_mp.py
@@ -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()