Skip to content

Commit 7dbc330

Browse files
committed
Ignore UnicodeDecodeErrors here instead of crashing. Useful
because otherwise typing by mistake an accented letter during a Pdb++ session crashes the program with UnicodeDecodeError.
1 parent 7f0de44 commit 7dbc330

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pyrepl/unix_console.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,9 @@ def push_char(self, char):
411411
e.args[4] == 'unexpected end of data':
412412
pass
413413
else:
414-
raise
414+
#raise -- but better to ignore UnicodeDecodeErrors here...
415+
self.partial_char = ''
416+
return
415417
else:
416418
self.partial_char = ''
417419
self.event_queue.push(c)

0 commit comments

Comments
 (0)