From 82130faa01e94f683fd6a2ef07b4331c8cc80b7d Mon Sep 17 00:00:00 2001 From: Dawson Date: Fri, 17 Apr 2026 10:57:19 -0400 Subject: [PATCH] correcting python error --- .gitea/workflows/build-fedora-rpms.yml | 12 ++++++++++++ .github/workflows/build-fedora-rpms.yml | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/.gitea/workflows/build-fedora-rpms.yml b/.gitea/workflows/build-fedora-rpms.yml index 69d46df..2e29b56 100644 --- a/.gitea/workflows/build-fedora-rpms.yml +++ b/.gitea/workflows/build-fedora-rpms.yml @@ -77,8 +77,20 @@ jobs: source_manifest = Path(os.environ["SOURCE_MANIFEST"]) source_map_path = Path(os.environ["SOURCE_MAP"]) + requested_source_map_path = source_map_path package_kind = os.environ["PACKAGE_KIND"].strip() package_input = os.environ["PACKAGE_INPUT"] + if not source_manifest.exists(): + raise SystemExit(f"Source manifest not found: {source_manifest}") + if not source_map_path.exists() and source_map_path.name == "binary-map.tsv": + compatibility_path = source_map_path.with_name("source-map.tsv") + if compatibility_path.exists(): + source_map_path = compatibility_path + if not source_map_path.exists(): + raise SystemExit( + f"Source map not found: {requested_source_map_path}. " + f"Expected an existing TSV such as {requested_source_map_path.with_name('source-map.tsv')}" + ) source_packages = [ line.strip() for line in source_manifest.read_text(encoding="ascii").splitlines() diff --git a/.github/workflows/build-fedora-rpms.yml b/.github/workflows/build-fedora-rpms.yml index 69d46df..2e29b56 100644 --- a/.github/workflows/build-fedora-rpms.yml +++ b/.github/workflows/build-fedora-rpms.yml @@ -77,8 +77,20 @@ jobs: source_manifest = Path(os.environ["SOURCE_MANIFEST"]) source_map_path = Path(os.environ["SOURCE_MAP"]) + requested_source_map_path = source_map_path package_kind = os.environ["PACKAGE_KIND"].strip() package_input = os.environ["PACKAGE_INPUT"] + if not source_manifest.exists(): + raise SystemExit(f"Source manifest not found: {source_manifest}") + if not source_map_path.exists() and source_map_path.name == "binary-map.tsv": + compatibility_path = source_map_path.with_name("source-map.tsv") + if compatibility_path.exists(): + source_map_path = compatibility_path + if not source_map_path.exists(): + raise SystemExit( + f"Source map not found: {requested_source_map_path}. " + f"Expected an existing TSV such as {requested_source_map_path.with_name('source-map.tsv')}" + ) source_packages = [ line.strip() for line in source_manifest.read_text(encoding="ascii").splitlines()