1
0
Fork 0
mirror of https://github.com/Thor77/TeamspeakStats.git synced 2025-04-13 08:55:35 -04:00

Fix parse_logs-run not returning server with cache

because the filter-object will get evaluated (and is empty afterwards)
when caching it.
To fix this, it's now evaluated onece (converting it into a list) and
the resulting list can be accessed multiple times without "destroying"
it.
This commit is contained in:
Thor77 2018-02-01 21:06:56 +01:00
parent af608f175f
commit f6e3f9566b

View file

@ -149,7 +149,7 @@ def parse_logs(log_glob, ident_map=None, online_dc=True, cache_path=None):
else:
# parse logfile line by line
# and filter lines without events
events = filter(None, map(_parse_line, f))
events = list(filter(None, map(_parse_line, f)))
# cache parsed events
if cache is not None: