Skip to content
5 changes: 1 addition & 4 deletions Lib/pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -1184,6 +1184,7 @@ def complete_multiline_names(self, text, line, begidx, endidx):
return self.completedefault(text, line, begidx, endidx)

def completedefault(self, text, line, begidx, endidx):
assert self.curframe is not None
if text.startswith("$"):
# Complete convenience variables
conv_vars = self.curframe.f_globals.get('__pdb_convenience_variables', {})
Expand Down Expand Up @@ -1332,9 +1333,6 @@ def do_break(self, arg, temporary=False):
if bp:
self.message(bp.bpformat())
return
if not self.curframe:
self.error('No current frame.')
return
# parse arguments; comma has lowest precedence
# and cannot occur in filename
filename = None
Expand Down Expand Up @@ -1414,7 +1412,6 @@ def do_break(self, arg, temporary=False):
# To be overridden in derived debuggers
def defaultFile(self):
"""Produce a reasonable default."""
assert self.curframe is not None
Comment thread
picnixz marked this conversation as resolved.
Outdated
filename = self.curframe.f_code.co_filename
if filename == '<string>' and self.mainpyfile:
filename = self.mainpyfile
Expand Down
Loading