From 4808b6d40b49772fa60854ecfe4ccd442347e00e Mon Sep 17 00:00:00 2001 From: s3lph <1375407-s3lph@users.noreply.gitlab.com> Date: Fri, 15 Apr 2022 19:20:45 +0200 Subject: [PATCH] Fix some type errors and wrong api arguments --- multischleuder/conflict.py | 4 ++-- multischleuder/processor.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/multischleuder/conflict.py b/multischleuder/conflict.py index d719413..8d1c169 100644 --- a/multischleuder/conflict.py +++ b/multischleuder/conflict.py @@ -41,13 +41,13 @@ class ConflictMessage: h = hashlib.new('sha1') # Include the chosen email an source sub-list h.update(struct.pack('!sd', - self._chosen.email, + self._chosen.email.encode(), self._chosen.schleuder)) # Include all subscriptions, including the FULL key for s in subs: h.update(struct.pack('!ds', s.schleuder, - s.key.blob)) + s.key.blob.encode())) return h.hexdigest() @property diff --git a/multischleuder/processor.py b/multischleuder/processor.py index c8040c5..5ab7711 100644 --- a/multischleuder/processor.py +++ b/multischleuder/processor.py @@ -63,10 +63,10 @@ class MultiList: self._api.subscribe(sub, target_list) self._logger.info(f'Subscribed user: {sub}') for sub in to_update: - self._api.update_fingerprint(sub) + self._api.update_fingerprint(sub, target_list) self._logger.info(f'Updated key: {sub}') for sub in to_unsubscribe: - self._api.unsubscribe(sub) + self._api.unsubscribe(sub, target_list) self._logger.info(f'Unsubscribed user: {sub}') for key in to_remove: self._api.delete_key(key, target_list)