Skip to content

Commit

Permalink
Merge pull request #28 from gilfree/do-not-crash-on-non-unicode
Browse files Browse the repository at this point in the history
do not crash on unicode decode errors
  • Loading branch information
cs01 authored Sep 20, 2022
2 parents 2b5fd21 + 9fa6b76 commit 50dce49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyxtermjs/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def read_and_forward_pty_output():
timeout_sec = 0
(data_ready, _, _) = select.select([app.config["fd"]], [], [], timeout_sec)
if data_ready:
output = os.read(app.config["fd"], max_read_bytes).decode()
output = os.read(app.config["fd"], max_read_bytes).decode(errors='ignore')
socketio.emit("pty-output", {"output": output}, namespace="/pty")


Expand Down

0 comments on commit 50dce49

Please sign in to comment.