Skip to content

Commit

Permalink
Gracefully handle programs that write garbled output by replacing pro…
Browse files Browse the repository at this point in the history
…blematic characters.
  • Loading branch information
jendrikseipp committed Mar 30, 2024
1 parent 4f86f61 commit d73e761
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions docs/news.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
Changelog
=========

v8.2 (unreleased)
-----------------

Lab
^^^
* Gracefully handle programs that write garbled output by replacing problematic characters (Jendrik Seipp).

Downward Lab
^^^^^^^^^^^^
* None.

v8.1 (2024-02-28)
-----------------

Expand Down
2 changes: 1 addition & 1 deletion lab/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

def get_string(s):
if isinstance(s, bytes):
return s.decode(DEFAULT_ENCODING)
return s.decode(DEFAULT_ENCODING, errors="replace")
else:
raise ValueError("tools.get_string() only accepts byte strings")

Expand Down

0 comments on commit d73e761

Please sign in to comment.