Author: Armin Rigo <[email protected]>
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()
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to