Commits

Armin Rigo  committed 9ce3b59

Accept truncated log files

  • Participants
  • Parent commits 1ab21f8

Comments (0)

Files changed (1)

File rpython/tool/logparser.py

     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
     #
     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