Skip to content

Commit 99837fd

Browse files
Deal with enterframe == None in set_step
1 parent e47731e commit 99837fd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/bdb.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,8 +583,9 @@ def set_until(self, frame, lineno=None):
583583

584584
def set_step(self):
585585
"""Stop after one line of code."""
586+
# set_step() could be called from signal handler so enterframe might be None
586587
self._set_stopinfo(None, None, startframe=self.enterframe,
587-
startlineno=self.enterframe.f_lineno)
588+
startlineno=getattr(self.enterframe, 'f_lineno', None))
588589

589590
def set_stepinstr(self):
590591
"""Stop before the next instruction."""

0 commit comments

Comments
 (0)