From e48b4c0b80a4e3fa6c25d4dfbc0f94504845e33b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20H=C3=B6ppner?= <jonas.hoeppner@garz-fricke.com> Date: Thu, 10 Nov 2022 14:59:34 +0100 Subject: [PATCH] package_release: Do not fail if a file does not exist --- scripts/package_release.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/package_release.py b/scripts/package_release.py index 6db2c7bb..2726273a 100755 --- a/scripts/package_release.py +++ b/scripts/package_release.py @@ -28,7 +28,12 @@ def generate_md5sums_file(input_files: list[str], output_file: str): """ md5sums = {} for f in input_files: - md5sums[os.path.basename(f)] = md5(f) + # This might should be used somewhere before, + # but the previous state was not to fail when a file in + # the list did not exist, like in copy files + if os.path.exists(f): + md5sums[os.path.basename(f)] = md5(f) + output_dir = os.path.dirname(output_file) if output_dir: os.makedirs(output_dir, exist_ok=True) -- GitLab