Skip to content

Commit 18d776f

Browse files
sechkovaMVrachev
authored andcommitted
Check snapshot value for None
For consistency with the rest if the checks. Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
1 parent 1f0854f commit 18d776f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)