summaryrefslogtreecommitdiffstats
path: root/Lib/pdb.py
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2008-12-14 10:54:50 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2008-12-14 10:54:50 (GMT)
commita2053475bb8a908e1cc80c765e02c98a6f354b19 (patch)
tree8449947a38952aaf7e64a7320c58fedf85fa07db /Lib/pdb.py
parent3e16f3dd7f9219a19e5802b721b19fde93fc56a5 (diff)
downloadcpython-a2053475bb8a908e1cc80c765e02c98a6f354b19.zip
cpython-a2053475bb8a908e1cc80c765e02c98a6f354b19.tar.gz
cpython-a2053475bb8a908e1cc80c765e02c98a6f354b19.tar.bz2
Fix several issues relating to access to source code inside zipfiles. Initial work by Alexander Belopolsky. See Misc/NEWS in this checkin for details.
Diffstat (limited to 'Lib/pdb.py')
-rwxr-xr-xLib/pdb.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/pdb.py b/Lib/pdb.py
index 4a080c7..3f76032 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -440,7 +440,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
Return `lineno` if it is, 0 if not (e.g. a docstring, comment, blank
line or EOF). Warning: testing is not comprehensive.
"""
- line = linecache.getline(filename, lineno)
+ line = linecache.getline(filename, lineno, self.curframe.f_globals)
if not line:
print >>self.stdout, 'End of file'
return 0
@@ -768,7 +768,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
breaklist = self.get_file_breaks(filename)
try:
for lineno in range(first, last+1):
- line = linecache.getline(filename, lineno)
+ line = linecache.getline(filename, lineno, self.curframe.f_globals)
if not line:
print >>self.stdout, '[EOF]'
break