diff options
author | Georg Brandl <georg@python.org> | 2010-07-31 21:22:36 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-07-31 21:22:36 (GMT) |
commit | a491727ded210994812ae1191253c0305dfc6885 (patch) | |
tree | 2f2e74527acbfcda4586767358f300279a8b1933 /Lib/hotshot | |
parent | 05f819b6e9b026ab454cf187269b145bd7ac1ed6 (diff) | |
download | cpython-a491727ded210994812ae1191253c0305dfc6885.zip cpython-a491727ded210994812ae1191253c0305dfc6885.tar.gz cpython-a491727ded210994812ae1191253c0305dfc6885.tar.bz2 |
#1019882: if start() and stop() were not in the same stack frame, stats.load() would crash with IndexError.
Diffstat (limited to 'Lib/hotshot')
-rw-r--r-- | Lib/hotshot/log.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/hotshot/log.py b/Lib/hotshot/log.py index 47c932a..17e8b50 100644 --- a/Lib/hotshot/log.py +++ b/Lib/hotshot/log.py @@ -106,7 +106,10 @@ class LogReader: return what, t, tdelta if what == WHAT_EXIT: - return what, self._pop(), tdelta + try: + return what, self._pop(), tdelta + except IndexError: + raise StopIteration if what == WHAT_LINENO: filename, firstlineno, funcname = self._stack[-1] |