diff options
Diffstat (limited to 'Lib/pdb.py')
-rwxr-xr-x | Lib/pdb.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -752,7 +752,8 @@ class Pdb(bdb.Bdb, cmd.Cmd): """ # this method should be callable before starting debugging, so default # to "no globals" if there is no current frame - globs = self.curframe.f_globals if hasattr(self, 'curframe') else None + frame = getattr(self, 'curframe', None) + globs = frame.f_globals if frame else None line = linecache.getline(filename, lineno, globs) if not line: self.message('End of file') |