@@ -416,11 +416,11 @@ def preloop(self):
416
416
self .message ('display %s: %r [old: %r]' %
417
417
(expr , newvalue , oldvalue ))
418
418
419
- def interaction (self , frame , traceback ):
419
+ def interaction (self , frame , tb_or_exc ):
420
420
# Restore the previous signal handler at the Pdb prompt.
421
421
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
424
424
self ._chained_exceptions = [exception ]
425
425
current = exception
426
426
while current := current .__context__ :
@@ -436,7 +436,7 @@ def interaction(self, frame, traceback):
436
436
pass
437
437
else :
438
438
Pdb ._previous_sigint_handler = None
439
- if self .setup (frame , traceback ):
439
+ if self .setup (frame , tb_or_exc ):
440
440
# no interaction desired at this time (happens if .pdbrc contains
441
441
# a command like "continue")
442
442
self .forget ()
@@ -1087,7 +1087,7 @@ def _select_frame(self, number):
1087
1087
self .lineno = None
1088
1088
1089
1089
def do_exceptions (self , arg ):
1090
- if not arg or arg == "list" :
1090
+ if not arg :
1091
1091
for ix , exc in enumerate (self ._chained_exceptions ):
1092
1092
prompt = ">" if ix == self ._chained_exception_index else " "
1093
1093
self .message (f"{ prompt } { ix } { exc !r} " )
0 commit comments