Skip to content

ngclient: return loaded metadata from Updater._load_targets #1507

@sechkova

Description

@sechkova

Description of issue or feature request:
During the traversal of the delegations tree, each targets metadata file is first loaded/downloaded and then "visited".
It would be convenient if Updater._load_targets directly returns the loaded metadata to avoid lookup on the next line.

Current behavior:

            # The metadata for 'role_name' must be downloaded/updated before
            # its targets, delegations, and child roles can be inspected.
            self._load_targets(role_name, parent_role)
            role_metadata: Targets = self._trusted_set[role_name].signed

Expected behavior:

role_metadata = self._load_targets(role_name, parent_role)

Metadata

Metadata

Assignees

Labels

backlogIssues to address with priority for current development goalsenhancementgood first issueBite-sized items for first time contributorsngclient

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions