Skip to content

Commit

Permalink
fixup: linting and add comment
Browse files Browse the repository at this point in the history
Signed-off-by: Kairo de Araujo <[email protected]>
  • Loading branch information
kairoaraujo committed Sep 11, 2024
1 parent 601193a commit 95e47e3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion repository_service_tuf_worker/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ def _remove_delegated_role_keys(
if key not in other_keys:
logging.debug(f"removing key id {key}")
targets.signed.delegations.keys.delete(key)
else:
else:
logging.debug(f"key {key} used by other role")

def _add_delegated_role_keys(
Expand Down Expand Up @@ -1034,6 +1034,9 @@ def _bootstrap_online_roles(
logging.debug("verifying delegations threshold")
for role in success:
if self._validate_threshold(success[role], targets, role):
# If the role uses online key it was signed by while
# adding the role by self._add_metadata_delegation.
# if the threshold is met, role is full signed
logging.debug(f"role '{role}' uses only online key")
snapshot.signed.meta[f"{role}.json"] = MetaFile(
success[role].signed.version
Expand Down

0 comments on commit 95e47e3

Please sign in to comment.