diff --git a/tsstats/log.py b/tsstats/log.py index a42f65b..db8e62b 100644 --- a/tsstats/log.py +++ b/tsstats/log.py @@ -144,7 +144,9 @@ def parse_logs(log_glob, ident_map=None, online_dc=True): clients.apply_events(itertools.chain.from_iterable(events)) # find connected clients - online_clients = list(filter(lambda c: c.connected, clients)) + online_clients = list( + filter(lambda c: c.connected, clients.values()) + ) logger.debug( 'Some clients are still connected: %s', online_clients diff --git a/tsstats/utils.py b/tsstats/utils.py index 62044d7..11151e0 100644 --- a/tsstats/utils.py +++ b/tsstats/utils.py @@ -13,7 +13,8 @@ def sort_clients(clients, key_l): :rtype: list ''' cl_data = [ - (client, key_l(client)) for client in clients if key_l(client) > 0 + (client, key_l(client)) for client in clients.values() + if key_l(client) > 0 ] return sorted(cl_data, key=lambda data: data[1], reverse=True)