Skip to content

Commit 0f69f28

Browse files
sechkovaJussi Kukkonen
authored andcommitted
Check snapshot value for None
For consistency with the rest if the checks. Signed-off-by: Teodora Sechkova <[email protected]>
1 parent 10b28f5 commit 0f69f28

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tuf/ngclient/_internal/metadata_bundle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ def update_snapshot(self, data: bytes): # pylint: disable=too-many-branches
356356

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

0 commit comments

Comments
 (0)