- Sources file can contain empty lines

This commit is contained in:
Stepan Oksanichenko 2024-08-08 13:40:29 +03:00
parent 6602d1ecab
commit c078cfb0a3
Signed by: soksanichenko
GPG Key ID: AB9983172AB1E45B

View File

@ -112,6 +112,8 @@ def iter_metadata(metadata_path: str) -> Iterator[Tuple[str, str, str]]:
"""
with open(metadata_path, 'r') as fd:
for line in fd:
if not line.strip():
continue
checksum, file_path = extract_checksum_and_file_path(line)
checksum_type = detect_checksum_type(checksum)
yield file_path, checksum, checksum_type