Make mypy happy
This commit is contained in:
parent
00d49c1451
commit
91e81f6931
1 changed files with 5 additions and 2 deletions
|
@ -98,11 +98,14 @@ class MultiList:
|
||||||
continue
|
continue
|
||||||
new_subs.add(s)
|
new_subs.add(s)
|
||||||
# Compare the key blobs to the ones present before this run
|
# 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
|
# 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_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_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:
|
if len(to_add) + len(to_subscribe) + len(to_unsubscribe) + len(to_remove) == 0:
|
||||||
logging.info(f'No changes for {self._target}')
|
logging.info(f'No changes for {self._target}')
|
||||||
|
|
Loading…
Reference in a new issue