From 96d6e9f050a5175c2310ff22ba20bcd20bd48bf9 Mon Sep 17 00:00:00 2001 From: Thor77 Date: Mon, 24 Jul 2017 14:49:25 +0200 Subject: [PATCH] Only yield Server if there are clients for it --- tsstats/log.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tsstats/log.py b/tsstats/log.py index 5e605ad..e582e13 100644 --- a/tsstats/log.py +++ b/tsstats/log.py @@ -131,5 +131,6 @@ def parse_logs(log_glob, ident_map=None, online_dc=True, *args, **kwargs): events = filter(None, map(_parse_line, f)) # chain apply events to Client-obj clients.apply_events(itertools.chain.from_iterable(events)) - # assemble Server-obj and yield - yield Server(virtualserver_id, clients) + if len(clients) >= 1: + # assemble Server-obj and yield + yield Server(virtualserver_id, clients)