From a3f4aeff35cd5aa45d635506ec9e1e8c3a36a8f8 Mon Sep 17 00:00:00 2001 From: Alexey Velikiy Date: Sun, 17 Mar 2019 05:44:34 +0100 Subject: [PATCH] @staticmethod to ServerMessage.fromJSON --- analytics/analytics/services/server_service.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/analytics/analytics/services/server_service.py b/analytics/analytics/services/server_service.py index 5654b8a..d515a99 100644 --- a/analytics/analytics/services/server_service.py +++ b/analytics/analytics/services/server_service.py @@ -27,6 +27,7 @@ class ServerMessage: result['requestId'] = self.request_id return result + @staticmethod def fromJSON(json: dict): method = json['method'] payload = None @@ -86,7 +87,7 @@ class ServerService: if message.request_id is not None: self.responses[message_object['requestId']] = message.payload return - + logger.debug(message.toJSON()) asyncio.ensure_future(self.on_message_handler(message)) except Exception as e: