From 58a36e1337ec3ecd7765e9412e15201569799e6a Mon Sep 17 00:00:00 2001 From: Andre Kahles Date: Tue, 19 Nov 2024 11:17:40 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Oleksandr Kulkov --- archiver/integrity.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/archiver/integrity.py b/archiver/integrity.py index e6c31ac..c6c79f2 100644 --- a/archiver/integrity.py +++ b/archiver/integrity.py @@ -77,10 +77,10 @@ def check_archive_part_integrity(source_name: Path) -> bool: def check_archive_list_integrity(source_path: Path, archive_name: str = None) -> bool: parts = helpers.get_parts(source_path) - if archive_name is None: - source_name = helpers.infer_source_name(source_path) - else: + if archive_name: source_name = source_path / Path(archive_name) + else: + source_name = helpers.infer_source_name(source_path) logging.info(f'Found {parts} parts in archive {source_path.as_posix()}') check_result = True