Skip to content

Commit

Permalink
Check snapshot value for None
Browse files Browse the repository at this point in the history
For consistency with the rest if the checks.

Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
  • Loading branch information
sechkova committed Jun 16, 2021
1 parent 46a8bd4 commit 28a66c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tuf/ngclient/_internal/metadata_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def update_snapshot(self, data: bytes): # pylint: disable=too-many-branches

# If an existing trusted snapshot is updated,
# check for a rollback attack
if self.snapshot:
if self.snapshot is not None:
for filename, fileinfo in self.snapshot.signed.meta.items():
new_fileinfo = new_snapshot.signed.meta.get(filename)

Expand Down

0 comments on commit 28a66c3

Please sign in to comment.