Skip to content

Commit 9ee94a2

Browse files
authored
Fix pdb.line_prefix binding in print_stack_entry
1 parent a35c683 commit 9ee94a2

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Lib/pdb.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ def _show_display(self):
654654

655655
def _get_tb_and_exceptions(self, tb_or_exc):
656656
"""
657-
Given a tracecack or an exception, return a tuple of chained exceptions
657+
Given a traceback or an exception, return a tuple of chained exceptions
658658
and current traceback to inspect.
659659
660660
This will deal with selecting the right ``__cause__`` or ``__context__``
@@ -2429,7 +2429,9 @@ def print_stack_trace(self, count=None):
24292429
except KeyboardInterrupt:
24302430
pass
24312431

2432-
def print_stack_entry(self, frame_lineno, prompt_prefix=line_prefix):
2432+
def print_stack_entry(self, frame_lineno, prompt_prefix=None):
2433+
if prompt_prefix is None:
2434+
prompt_prefix = line_prefix
24332435
frame, lineno = frame_lineno
24342436
if frame is self.curframe:
24352437
prefix = '> '

0 commit comments

Comments
 (0)