[pypy-commit] pypy default: Argh. See comment.

arigo noreply at buildbot.pypy.org
Thu Nov 17 10:53:35 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r49491:8477b89ad7b4
Date: 2011-11-17 09:53 +0000
http://bitbucket.org/pypy/pypy/changeset/8477b89ad7b4/

Log:	Argh. See comment.

diff --git a/lib_pypy/pyrepl/unix_console.py b/lib_pypy/pyrepl/unix_console.py
--- a/lib_pypy/pyrepl/unix_console.py
+++ b/lib_pypy/pyrepl/unix_console.py
@@ -412,7 +412,12 @@
                    e.args[4] == 'unexpected end of data':
                 pass
             else:
-                raise
+                # was: "raise".  But it crashes pyrepl, and by extension the
+                # pypy currently running, in which we are e.g. in the middle
+                # of some debugging session.  Argh.  Instead just print an
+                # error message to stderr and continue running, for now.
+                self.partial_char = ''
+                sys.stderr.write('\n%s: %s\n' % (e.__class__.__name__, e))
         else:
             self.partial_char = ''
             self.event_queue.push(c)


More information about the pypy-commit mailing list