summaryrefslogtreecommitdiffstats
path: root/contrib/python
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/python')
-rw-r--r--contrib/python/ipython/py2/IPython/core/debugger.py2
-rw-r--r--contrib/python/ipython/py3/IPython/core/debugger.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/contrib/python/ipython/py2/IPython/core/debugger.py b/contrib/python/ipython/py2/IPython/core/debugger.py
index f08cfb1a789..6a41b8b404b 100644
--- a/contrib/python/ipython/py2/IPython/core/debugger.py
+++ b/contrib/python/ipython/py2/IPython/core/debugger.py
@@ -408,7 +408,7 @@ class Pdb(OldPdb):
ret.append(u'%s(%s)%s\n' % (link,lineno,call))
start = lineno - 1 - context//2
- lines = ulinecache.getlines(filename)
+ lines = ulinecache.getlines(filename, self.curframe.f_globals)
start = min(start, len(lines) - context)
start = max(start, 0)
lines = lines[start : start + context]
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