From c078cfb0a305b8921f61351ef82341555fa5a4e4 Mon Sep 17 00:00:00 2001 From: Stepan Oksanichenko Date: Thu, 8 Aug 2024 13:40:29 +0300 Subject: [PATCH] - Sources file can contain empty lines --- almalinux/gitutils/common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/almalinux/gitutils/common.py b/almalinux/gitutils/common.py index 34e2fa9..f61bd28 100644 --- a/almalinux/gitutils/common.py +++ b/almalinux/gitutils/common.py @@ -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