Skip to content

Commit 767434c

Browse files
authored
bpo-37531: Fix regrtest _timedout() function on timeout (GH-15419)
Fix code handling TimeoutExpired exception in _timedout().
1 parent c486825 commit 767434c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/libregrtest/runtest_mp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,14 +184,14 @@ def mp_result_error(self, test_name, error_type, stdout='', stderr='',
184184
def _timedout(self, test_name):
185185
self._kill()
186186

187-
stdout = sterr = ''
187+
stdout = stderr = ''
188188
popen = self._popen
189189
try:
190190
stdout, stderr = popen.communicate(timeout=JOIN_TIMEOUT)
191191
except (subprocess.TimeoutExpired, OSError) as exc:
192192
print("WARNING: Failed to read worker process %s output "
193193
"(timeout=%.1f sec): %r"
194-
% (popen.pid, exc, timeout),
194+
% (popen.pid, JOIN_TIMEOUT, exc),
195195
file=sys.stderr, flush=True)
196196

197197
self._close_wait()

0 commit comments

Comments
 (0)