From fd4f70ac6c1842a9db18a49c7ed90ef2a1a24d68 Mon Sep 17 00:00:00 2001 From: Goffi Date: Fri, 4 Jun 2021 14:07:58 +0200 Subject: [PATCH] memory (sqlite): work around encoding issues with pickle --- sat/memory/sqlite.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sat/memory/sqlite.py b/sat/memory/sqlite.py index ff956237..e09798da 100644 --- a/sat/memory/sqlite.py +++ b/sat/memory/sqlite.py @@ -535,7 +535,7 @@ class SqliteStorage(object): if uid != current['uid']: # new message try: - extra = pickle.loads(extra or b"") + extra = self._load_pickle(extra or b"") except EOFError: extra = {} current = { @@ -1659,7 +1659,7 @@ class Updater(object): log.info("preparing message {}/{}".format(idx, total)) id_, timestamp, message, extra = row try: - extra = pickle.loads(str(extra or "")) + extra = self._load_pickle(extra or b"") except EOFError: extra = {} except Exception: