diff --git a/multischleuder/processor.py b/multischleuder/processor.py index a9eb2a2..a42ef5d 100644 --- a/multischleuder/processor.py +++ b/multischleuder/processor.py @@ -98,11 +98,14 @@ class MultiList: continue new_subs.add(s) # Compare the key blobs to the ones present before this run - unchanged_subs = {s for s in new_subs if s.key.blob in {o.key.blob for o in current_subs if o.key is not None}} + old_keys = {s.key.blob for s in current_subs if s.key is not None} + unchanged_subs = {s for s in new_subs if s.key is not None and s.key.blob in old_keys} + unchanged_fprs = {s.key.fingerprint for s in unchanged_subs if s.key is not None} # Remove the unchanged keys from the changesets so that they are not included in the admin report to_subscribe = {s for s in to_subscribe if s not in unchanged_subs} to_update = {s for s in to_update if s not in unchanged_subs} - to_add = {k for k in to_add if k.fingerprint not in {s.key.fingerprint for s in unchanged_subs}} + # need to compare by fpr because == includes the (potentially different) blob + to_add = {k for k in to_add if k.fingerprint not in unchanged_fprs} if len(to_add) + len(to_subscribe) + len(to_unsubscribe) + len(to_remove) == 0: logging.info(f'No changes for {self._target}')