Skip to content

Commit

Permalink
Avoid crash due to Unicode in output
Browse files Browse the repository at this point in the history
  • Loading branch information
zooba committed May 29, 2024
1 parent bc01c5d commit 2f520de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/test/test_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def run_py(self, args, env=None, allow_fail=False, expect_returncode=0, argv=Non
p.stdin.close()
p.wait(10)
out = p.stdout.read().decode("utf-8", "replace")
err = p.stderr.read().decode("ascii", "replace")
err = p.stderr.read().decode("ascii", "replace").replace("\uFFFD", "?")
if p.returncode != expect_returncode and support.verbose and not allow_fail:
print("++ COMMAND ++")
print([self.py_exe, *args])
Expand Down

0 comments on commit 2f520de

Please sign in to comment.