summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-05-11 18:16:33 +0200
committerwm4 <wm4@nowhere>2014-05-11 18:16:33 +0200
commitfd56e2dbe6aefb637af222e111d052c507883c7d (patch)
tree5869d10b3de6a91bb9ee6f952f67689538772e74
parentcc94436c5b3df9db96ddb34fbf4c7d4b467b62ca (diff)
downloadmpv-fd56e2dbe6aefb637af222e111d052c507883c7d.tar.bz2
mpv-fd56e2dbe6aefb637af222e111d052c507883c7d.tar.xz
TOOLS/stats-conv: don't crash on empty lines
-rwxr-xr-xTOOLS/stats-conv.py3
1 files changed, 3 insertions, 0 deletions
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: