diff --git a/.gitignore b/.gitignore index 1fc0e22..e918d3e 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,3 @@ __pycache__ .pytest_cache .python-version venv*/ -.idea/ diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py index 8fd546b..62cb350 100644 --- a/IPython/core/interactiveshell.py +++ b/IPython/core/interactiveshell.py @@ -14,6 +14,7 @@ import abc import ast import atexit +import bdb import builtins as builtin_mod import dis import functools @@ -3558,6 +3559,11 @@ class InteractiveShell(SingletonConfigurable): result.error_in_exec = e self.showtraceback(exception_only=True) warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1) + except bdb.BdbQuit: + etype, value, tb = sys.exc_info() + if result is not None: + result.error_in_exec = value + # the BdbQuit stops here except self.custom_exceptions: etype, value, tb = sys.exc_info() if result is not None: