From c80ebb029b7104bb0bae8f247de04c98c17ef8d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Mon, 11 Mar 2024 11:03:23 +0100 Subject: [PATCH] kiwibuild: Remove repos as dicts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The task needs just URLs, the dics don't bring anything here. Signed-off-by: Lubomír Sedlář --- pungi/phases/kiwibuild.py | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/pungi/phases/kiwibuild.py b/pungi/phases/kiwibuild.py index 843ee26c..c065b4aa 100644 --- a/pungi/phases/kiwibuild.py +++ b/pungi/phases/kiwibuild.py @@ -36,23 +36,10 @@ class KiwiBuildPhase( resolved_repos = [] for repo in repos: - if isinstance(repo, dict): - try: - url = repo["baseurl"] - except KeyError: - raise RuntimeError( - "`baseurl` is required in repo dict %s" % str(repo) - ) - url = util.get_repo_url(compose, url, arch=arch) - if url is None: - raise RuntimeError("Failed to resolve repo URL for %s" % str(repo)) - repo["baseurl"] = url - resolved_repos.append(repo) - else: - repo = util.get_repo_url(compose, repo, arch=arch) - if repo is None: - raise RuntimeError("Failed to resolve repo URL for %s" % repo) - resolved_repos.append(repo) + repo = util.get_repo_url(compose, repo, arch=arch) + if repo is None: + raise RuntimeError("Failed to resolve repo URL for %s" % repo) + resolved_repos.append(repo) return resolved_repos