Skip to content

Commit e30faa8

Browse files
committed
Remove empty hash dict check from MetaFile
The check for an empty hash dictionary is now part of the hash validation function. Signed-off-by: Teodora Sechkova <[email protected]>
1 parent 03f39b0 commit e30faa8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tuf/api/metadata.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -793,8 +793,7 @@ def verify_length_and_hashes(self, data: Union[bytes, BinaryIO]):
793793
if self.length is not None:
794794
self._verify_length(data, self.length)
795795

796-
# Skip the check in case of an empty dictionary too
797-
if self.hashes:
796+
if self.hashes is not None:
798797
self._verify_hashes(data, self.hashes)
799798

800799

0 commit comments

Comments
 (0)