From 14d3d85bd9f2a527cbf990fd2c1f0148cb3f78b8 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Mon, 14 Nov 2016 19:52:18 +0900 Subject: [PATCH] Need an array to take its len --- server/protocol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/protocol.py b/server/protocol.py index d433621..0711c05 100644 --- a/server/protocol.py +++ b/server/protocol.py @@ -157,7 +157,7 @@ class ServerManager(LoggedClass): def session_count(self): '''Returns a dictionary.''' - active = len(s for s in self.sessions if s.send_count) + active = len([s for s in self.sessions if s.send_count]) total = len(self.sessions) return {'active': active, 'inert': total - active, 'total': total}