summaryrefslogtreecommitdiffstats
path: root/Lib/inspect.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2017-01-02 04:09:07 (GMT)
committerBenjamin Peterson <benjamin@python.org>2017-01-02 04:09:07 (GMT)
commitc9d4c60a562f66ca73509ef682e88a1726b860f8 (patch)
tree688674287d981d2b133c2bcf90956ba5fdf18c2c /Lib/inspect.py
parent4365833d11fb8e0139d9e8a543692e963a749e38 (diff)
parentff0e3b7a54673791bb724be9679c85a4feb7468c (diff)
downloadcpython-c9d4c60a562f66ca73509ef682e88a1726b860f8.zip
cpython-c9d4c60a562f66ca73509ef682e88a1726b860f8.tar.gz
cpython-c9d4c60a562f66ca73509ef682e88a1726b860f8.tar.bz2
merge heads
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r--Lib/inspect.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py
index e6dae1e..6b9e0b0 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -1416,7 +1416,7 @@ def getframeinfo(frame, context=1):
except OSError:
lines = index = None
else:
- start = max(start, 1)
+ start = max(start, 0)
start = max(0, min(start, len(lines) - context))
lines = lines[start:start+context]
index = lineno - 1 - start