From 01a506524067e153891b868fefeb5001d97ae583 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 5 Mar 2020 22:55:11 +0100 Subject: Handle empty client_pickle --- external/messenger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/messenger.py b/external/messenger.py index cd175e1..89cf5be 100755 --- a/external/messenger.py +++ b/external/messenger.py @@ -213,7 +213,7 @@ class MessengerBridge: self.init_backlog_length = int(cmd["data"]["initial_backlog"]) client_file = "/tmp/fbclient_" + hashlib.sha224(cmd["data"]["email"].encode("utf-8")).hexdigest() - if "client_pickle" in cmd["data"]: + if "client_pickle" in cmd["data"] and len(cmd["data"]["client_pickle"]) > 0: data = base64.b64decode(cmd["data"]["client_pickle"]) data = zlib.decompress(data) self.client = pickle.loads(data) -- cgit v1.2.3