From 4c2a51bc5a463d572c57fb8e6309991ac63570b6 Mon Sep 17 00:00:00 2001
From: Thor77 <thor77@thor77.org>
Date: Tue, 26 Sep 2017 11:15:41 +0200
Subject: [PATCH] Fix cache not written without data

---
 tsstats/log.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tsstats/log.py b/tsstats/log.py
index 4cd996c..2cced0a 100644
--- a/tsstats/log.py
+++ b/tsstats/log.py
@@ -177,5 +177,5 @@ def parse_logs(log_glob, ident_map=None, online_dc=True, cache_path=None):
         if len(clients) >= 1:
             # assemble Server-obj and yield
             yield Server(virtualserver_id, clients)
-    if cache:
+    if cache is not None:
         cache.write()