From fd56e2dbe6aefb637af222e111d052c507883c7d Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 11 May 2014 18:16:33 +0200 Subject: TOOLS/stats-conv: don't crash on empty lines --- TOOLS/stats-conv.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'TOOLS/stats-conv.py') diff --git a/TOOLS/stats-conv.py b/TOOLS/stats-conv.py index 5f81836d8f..29a6b7ea7d 100755 --- a/TOOLS/stats-conv.py +++ b/TOOLS/stats-conv.py @@ -45,6 +45,9 @@ def get_event(event): return G.events[event] for line in [line.split("#")[0].strip() for line in open(filename, "r")]: + line = line.strip() + if not line: + continue ts, event = line.split(" ", 1) ts = int(ts) / 1000 # milliseconds if G.start is None: -- cgit v1.2.3