From: Guido van Rossum Date: Sun, 12 Jan 1992 23:26:55 +0000 (+0000) Subject: react to interrupts differently X-Git-Tag: v0.9.8~612 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d6c3f25f3e1b7b1177c8995569577a3fa49ec551;p=thirdparty%2FPython%2Fcpython.git react to interrupts differently --- diff --git a/Lib/pdb.py b/Lib/pdb.py index 259c77074635..980720229bcd 100755 --- a/Lib/pdb.py +++ b/Lib/pdb.py @@ -9,6 +9,8 @@ # - Where and when to stop exactly when 'next' encounters a return? # (should be level-based -- don't trace anything deeper than current) # - Show stack traces upside-down (like dbx/gdb) +# - When stopping on an exception, show traceback stack +# - Merge with tb (for post-mortem usage) import string import sys @@ -120,6 +122,9 @@ class Pdb(Cmd): if self.botframe is None: self.botframe = frame if where == 'exception': + if self.whatnext == 'continue' and \ + arg[0] is not KeyboardInterrupt: + return self.trace stop = 1 elif self.whatnext == 'continue': stop = 0