We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55adbcc commit 0bda5c2Copy full SHA for 0bda5c2
Lib/pdb.py
@@ -2788,13 +2788,14 @@ def do_run(self, arg):
2788
do_restart = do_run
2789
2790
def _error_exc(self):
2791
- exc = sys.exception()
2792
- if isinstance(exc, SystemExit):
+ if self._interact_state and isinstance(sys.exception(), SystemExit):
2793
# If we get a SystemExit in 'interact' mode, exit the REPL.
2794
self._interact_state = None
2795
- super()._error_exc()
2796
+ ret = super()._error_exc()
2797
self.message("*exit from pdb interact command*")
+ return ret
+ else:
2798
+ return super()._error_exc()
2799
2800
def default(self, line):
2801
# Unlike Pdb, don't prompt for more lines of a multi-line command.
0 commit comments