unbreak build

This commit is contained in:
Marks Polakovs 2020-04-13 13:08:28 +02:00
parent 774c68bb1a
commit 7be882acbd

View file

@ -147,12 +147,14 @@ class Session(object):
async def activate(self) -> None: async def activate(self) -> None:
print(self.connection_id, "Activating") print(self.connection_id, "Activating")
self.running = True 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: async def deactivate(self) -> None:
print(self.connection_id, "Deactivating") print(self.connection_id, "Deactivating")
self.running = False 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: async def end(self) -> None:
global active_sessions, live_session global active_sessions, live_session