Skip to content

Commit

Permalink
Replace decode errors on unknown bytes (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
LeStarch authored Aug 20, 2024
1 parent a22b5f4 commit b725445
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/fprime/fbuild/cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,11 @@ def _communicate(proc, stdout, stderr, print_output=True):
for key, _ in events:
appendable, stream = key.data
try:
line = key.fileobj.readline().decode().replace("\r\n", "\n")
line = (
key.fileobj.readline()
.decode(errors="replace")
.replace("\r\n", "\n")
)
# Some systems (like running inside Docker) raise an io error instead of returning "" when the device
# is ended. Not sure why this is, but the effect is the same, on IOError assume end-of-input
except OSError:
Expand Down

0 comments on commit b725445

Please sign in to comment.