Author: Armin Rigo <[email protected]>
Branch:
Changeset: r162:60e7c5ca06b5
Date: 2012-02-05 18:42 +0100
http://bitbucket.org/pypy/pyrepl/changeset/60e7c5ca06b5/
Log: Ignore UnicodeDecodeErrors here instead of crashing. Useful because
otherwise typing by mistake an accented letter during a Pdb++
session crashes the program with UnicodeDecodeError.
diff --git a/pyrepl/unix_console.py b/pyrepl/unix_console.py
--- a/pyrepl/unix_console.py
+++ b/pyrepl/unix_console.py
@@ -411,7 +411,9 @@
e.args[4] == 'unexpected end of data':
pass
else:
- raise
+ #raise -- but better to ignore UnicodeDecodeErrors here...
+ self.partial_char = ''
+ return
else:
self.partial_char = ''
self.event_queue.push(c)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit