From 7be882acbd18da93218fc69376684184acd70310 Mon Sep 17 00:00:00 2001 From: Marks Polakovs Date: Mon, 13 Apr 2020 13:08:28 +0200 Subject: [PATCH] unbreak build --- server.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server.py b/server.py index b751c8c..9bebe37 100644 --- a/server.py +++ b/server.py @@ -147,12 +147,14 @@ class Session(object): async def activate(self) -> None: print(self.connection_id, "Activating") self.running = True - await self.websocket.send(json.dumps({"kind": "ACTIVATED"})) + if self.websocket is not None: + await self.websocket.send(json.dumps({"kind": "ACTIVATED"})) async def deactivate(self) -> None: print(self.connection_id, "Deactivating") self.running = False - await self.websocket.send(json.dumps({"kind": "DEACTIVATED"})) + if self.websocket is not None: + await self.websocket.send(json.dumps({"kind": "DEACTIVATED"})) async def end(self) -> None: global active_sessions, live_session