Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Commit

Permalink
error if multiple urls are defined
Browse files Browse the repository at this point in the history
  • Loading branch information
thegreyd committed Nov 23, 2022
1 parent 60b3da9 commit 475b997
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions doozerlib/rhcos.py
Expand Up @@ -132,10 +132,14 @@ def rhcos_release_url(self) -> str:
if self.custom:
bucket += '-custom'

if self.runtime.group_config.urls.rhcos_release_base[bucket]:
return self.runtime.group_config.urls.rhcos_release_base[bucket]
elif self.runtime.group_config.urls.rhcos_release_base["multi"]:
return self.runtime.group_config.urls.rhcos_release_base["multi"]
multi_url = self.runtime.group_config.urls.rhcos_release_base["multi"]
bucket_url = self.runtime.group_config.urls.rhcos_release_base[bucket]
if multi_url:
if bucket_url:
raise ValueError(f"Multiple rhcos_release_base urls found in group config: `multi` and `{bucket}`")
return multi_url
if bucket_url:
return bucket_url

bucket_suffix = brew_suffix_for_arch(self.brew_arch)
if self.custom:
Expand Down

0 comments on commit 475b997

Please sign in to comment.