[pypy-commit] pypy default: Catch MemoryErrors raised by the machinery of interactive command-line (like compiling the input), and

arigo noreply at buildbot.pypy.org
Sun Nov 24 16:45:25 CET 2013


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r68309:6d65219fce4b
Date: 2013-11-24 16:44 +0100
http://bitbucket.org/pypy/pypy/changeset/6d65219fce4b/

Log:	Catch MemoryErrors raised by the machinery of interactive command-
	line (like compiling the input), and display it like we do
	KeyboardInterrupt.

diff --git a/lib_pypy/pyrepl/simple_interact.py b/lib_pypy/pyrepl/simple_interact.py
--- a/lib_pypy/pyrepl/simple_interact.py
+++ b/lib_pypy/pyrepl/simple_interact.py
@@ -63,3 +63,6 @@
         except KeyboardInterrupt:
             console.write("\nKeyboardInterrupt\n")
             console.resetbuffer()
+        except MemoryError:
+            console.write("\nMemoryError\n")
+            console.resetbuffer()


More information about the pypy-commit mailing list