From b63e87e42eb6b9db4711bf59114fd2c2fb7ec953 2019-07-23 04:32:27 From: lllf Date: 2019-07-23 04:32:27 Subject: [PATCH] Sets error_before_exec to be the value of the exception instead of the stack trace --- diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py index 9a25185..5774d34 100644 --- a/IPython/core/interactiveshell.py +++ b/IPython/core/interactiveshell.py @@ -2988,7 +2988,7 @@ class InteractiveShell(SingletonConfigurable): self.showtraceback(preprocessing_exc_tuple) if store_history: self.execution_count += 1 - return error_before_exec(preprocessing_exc_tuple[2]) + return error_before_exec(preprocessing_exc_tuple[1]) # Our own compiler remembers the __future__ environment. If we want to # run code with a separate __future__ environment, use the default