@@ -416,11 +416,11 @@ def preloop(self):
416416 self .message ('display %s: %r [old: %r]' %
417417 (expr , newvalue , oldvalue ))
418418
419- def interaction (self , frame , traceback ):
419+ def interaction (self , frame , tb_or_exc ):
420420 # Restore the previous signal handler at the Pdb prompt.
421421
422- if isinstance (traceback , BaseException ):
423- traceback , exception = traceback .__traceback__ , traceback
422+ if isinstance (tb_or_exc , BaseException ):
423+ tb_or_exc , exception = tb_or_exc .__traceback__ , tb_or_exc
424424 self ._chained_exceptions = [exception ]
425425 current = exception
426426 while current := current .__context__ :
@@ -436,7 +436,7 @@ def interaction(self, frame, traceback):
436436 pass
437437 else :
438438 Pdb ._previous_sigint_handler = None
439- if self .setup (frame , traceback ):
439+ if self .setup (frame , tb_or_exc ):
440440 # no interaction desired at this time (happens if .pdbrc contains
441441 # a command like "continue")
442442 self .forget ()
@@ -1087,7 +1087,7 @@ def _select_frame(self, number):
10871087 self .lineno = None
10881088
10891089 def do_exceptions (self , arg ):
1090- if not arg or arg == "list" :
1090+ if not arg :
10911091 for ix , exc in enumerate (self ._chained_exceptions ):
10921092 prompt = ">" if ix == self ._chained_exception_index else " "
10931093 self .message (f"{ prompt } { ix } { exc !r} " )
0 commit comments