Skip to content

Commit 50dce49

Browse files
authored
Merge pull request #28 from gilfree/do-not-crash-on-non-unicode
do not crash on unicode decode errors
2 parents 2b5fd21 + 9fa6b76 commit 50dce49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyxtermjs/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def read_and_forward_pty_output():
3838
timeout_sec = 0
3939
(data_ready, _, _) = select.select([app.config["fd"]], [], [], timeout_sec)
4040
if data_ready:
41-
output = os.read(app.config["fd"], max_read_bytes).decode()
41+
output = os.read(app.config["fd"], max_read_bytes).decode(errors='ignore')
4242
socketio.emit("pty-output", {"output": output}, namespace="/pty")
4343

4444

0 commit comments

Comments
 (0)