| commit | a050171ee9e44697260cd5415310777dadb5555e | [log] [tgz] | 
|---|---|---|
| author | Raymond Hettinger <python@rcn.com> | Tue Jun 15 11:22:53 2004 +0000 | 
| committer | Raymond Hettinger <python@rcn.com> | Tue Jun 15 11:22:53 2004 +0000 | 
| tree | c85f091ad31a71d1225752b136e7202c111e4020 | |
| parent | 40333ceeac8574dffe6cfef13fbe17dfa2596033 [diff] | 
SF bug #973092: inspect.getframeinfo bug if 'context' is to big Make sure the start argument is not negative.
diff --git a/Lib/inspect.py b/Lib/inspect.py index 8a58ce9..12c9cb7 100644 --- a/Lib/inspect.py +++ b/Lib/inspect.py
@@ -756,7 +756,7 @@ lines = index = None else: start = max(start, 1) - start = min(start, len(lines) - context) + start = max(0, min(start, len(lines) - context)) lines = lines[start:start+context] index = lineno - 1 - start else: