From 2b82f19c330887a48d3cb8e7e854e5aa87a5ee8e 2009-05-12 20:30:36 From: Ville M. Vainio Date: 2009-05-12 20:30:36 Subject: [PATCH] catch MemoryError on compile() (crash reported by Daniel Ashbrook) --- diff --git a/IPython/iplib.py b/IPython/iplib.py index c6515ef..0de50ec 100644 --- a/IPython/iplib.py +++ b/IPython/iplib.py @@ -2209,7 +2209,7 @@ class InteractiveShell(object,Magic): try: code = self.compile(source,filename,symbol) - except (OverflowError, SyntaxError, ValueError, TypeError): + except (OverflowError, SyntaxError, ValueError, TypeError, MemoryError): # Case 1 self.showsyntaxerror(filename) return None