Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r66114:9ce3b5947b41 Date: 2013-08-13 10:51 +0200 http://bitbucket.org/pypy/pypy/changeset/9ce3b5947b41/
Log: Accept truncated log files diff --git a/rpython/tool/logparser.py b/rpython/tool/logparser.py --- a/rpython/tool/logparser.py +++ b/rpython/tool/logparser.py @@ -133,6 +133,8 @@ def rectime(category1, timestart1, timestop1, subcats): substartstop = [] for entry in getsubcategories(subcats): + if len(entry) != 4: + continue rectime(*entry) substartstop.append(entry[1:3]) # (start, stop) # compute the total time for category1 as the part of the @@ -238,7 +240,11 @@ # def recdraw(sublist, subheight): firstx1 = None - for category1, timestart1, timestop1, subcats in sublist: + for entry in sublist: + try: + category1, timestart1, timestop1, subcats = entry + except ValueError: + continue x1 = int((timestart1 - timestart0) * timefactor) x2 = int((timestop1 - timestart0) * timefactor) y1 = (height - subheight) / 2 _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit