From f6e3f9566befab90a4efde170040ecffbe3982a4 Mon Sep 17 00:00:00 2001
From: Thor77 <thor77@thor77.org>
Date: Thu, 1 Feb 2018 21:06:56 +0100
Subject: [PATCH] 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.
---
 tsstats/log.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tsstats/log.py b/tsstats/log.py
index 2cced0a..88b051a 100644
--- a/tsstats/log.py
+++ b/tsstats/log.py
@@ -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: