Skip to content

Commit e902503

Browse files
authored
gh-119070: Avoid test crash due to Unicode in stderr output (GH-119747)
1 parent bc01c5d commit e902503

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/test_launcher.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def run_py(self, args, env=None, allow_fail=False, expect_returncode=0, argv=Non
232232
p.stdin.close()
233233
p.wait(10)
234234
out = p.stdout.read().decode("utf-8", "replace")
235-
err = p.stderr.read().decode("ascii", "replace")
235+
err = p.stderr.read().decode("ascii", "replace").replace("\uFFFD", "?")
236236
if p.returncode != expect_returncode and support.verbose and not allow_fail:
237237
print("++ COMMAND ++")
238238
print([self.py_exe, *args])

0 commit comments

Comments
 (0)