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
1 changed files with 1 additions and 1 deletions

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: