Skip to content

Commit 28a66c3

Browse files
committed
Check snapshot value for None
For consistency with the rest if the checks. Signed-off-by: Teodora Sechkova <[email protected]>
1 parent 46a8bd4 commit 28a66c3

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
@@ -359,7 +359,7 @@ def update_snapshot(self, data: bytes): # pylint: disable=too-many-branches
359359

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

0 commit comments

Comments
 (0)