summaryrefslogtreecommitdiffstats
path: root/contrib/python/ipython/py3/IPython/core
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/python/ipython/py3/IPython/core')
-rw-r--r--contrib/python/ipython/py3/IPython/core/debugger.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/python/ipython/py3/IPython/core/debugger.py b/contrib/python/ipython/py3/IPython/core/debugger.py
index 8e968548f81..26bd45ff948 100644
--- a/contrib/python/ipython/py3/IPython/core/debugger.py
+++ b/contrib/python/ipython/py3/IPython/core/debugger.py
@@ -616,7 +616,7 @@ class Pdb(OldPdb):
ret.append("%s(%s)%s\n" % (link, lineno, call))
start = lineno - 1 - context//2
- lines = linecache.getlines(filename)
+ lines = linecache.getlines(filename, self.curframe.f_globals)
start = min(start, len(lines) - context)
start = max(start, 0)
lines = lines[start : start + context]
@@ -674,7 +674,7 @@ class Pdb(OldPdb):
filename = self._exec_filename
for lineno in range(first, last+1):
- line = linecache.getline(filename, lineno)
+ line = linecache.getline(filename, lineno, self.curframe.f_globals)
if not line:
break