mirror of https://github.com/mpv-player/mpv
TOOLS/stats-conv: don't crash on empty lines
This commit is contained in:
parent
cc94436c5b
commit
fd56e2dbe6
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue