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:
parent
af608f175f
commit
f6e3f9566b
|
@ -149,7 +149,7 @@ def parse_logs(log_glob, ident_map=None, online_dc=True, cache_path=None):
|
||||||
else:
|
else:
|
||||||
# parse logfile line by line
|
# parse logfile line by line
|
||||||
# and filter lines without events
|
# and filter lines without events
|
||||||
events = filter(None, map(_parse_line, f))
|
events = list(filter(None, map(_parse_line, f)))
|
||||||
|
|
||||||
# cache parsed events
|
# cache parsed events
|
||||||
if cache is not None:
|
if cache is not None:
|
||||||
|
|
Loading…
Reference in New Issue