Skip to content

Commit 9334c7e

Browse files
authored
Do not crash on UTF-8 decode errors (#423)
This PR implements a fix suggested in #407. There are also other UTF-8 related issues: #130 #347 #292
1 parent 93e9312 commit 9334c7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gdbgui/server/ptylib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def read(self) -> Optional[str]:
7676
if data_to_read:
7777
try:
7878
response = os.read(self.stdout, self.max_read_bytes).decode()
79-
except OSError:
79+
except (OSError, UnicodeDecodeError):
8080
return None
8181
return response
8282
return None

0 commit comments

Comments
 (0)