| |
@@ -344,6 +344,10 @@
|
| |
return "%s/%s" % (org, repo_name)
|
| |
|
| |
|
| |
+ class StreamMappingError(RHELError):
|
| |
+ pass
|
| |
+
|
| |
+
|
| |
def stream_mapping(csname):
|
| |
"""
|
| |
Given a CentOS Stream name, map it to the corresponding RHEL name.
|
| |
@@ -366,7 +370,7 @@
|
| |
return 10, "rhel-10"
|
| |
if csname == "c11s" or csname == "cs11":
|
| |
return 11, "rhel-11"
|
| |
- return None
|
| |
+ raise StreamMappingError(f"{csname} is not a Stream branch")
|
| |
|
| |
|
| |
def does_branch_exist(rhel_dist_git, namespace, repo_name, branch):
|
| |
@@ -525,7 +529,21 @@
|
| |
except (ConnectionError, HTTPError) as e:
|
| |
raise RHELError("Could not retrieve distrobaker config. Are you on the VPN?")
|
| |
|
| |
- x_version, rhel_version = stream_mapping(cs_branch)
|
| |
+ try:
|
| |
+ x_version, rhel_version = stream_mapping(cs_branch)
|
| |
+ except StreamMappingError as e:
|
| |
+ # This is not a standard branch name, so it's probably either a custom
|
| |
+ # branch or a module stream branch. Either way, we'll return it as-is
|
| |
+ # and always treat it as if it is in enforcing mode.
|
| |
+ return rhel_state_nt(
|
| |
+ latest_version=cs_branch,
|
| |
+ target_version=cs_branch,
|
| |
+ rule_branch=cs_branch,
|
| |
+ phase=pp_phase_maintenance,
|
| |
+ rhel_target_default="none",
|
| |
+ enforcing=True,
|
| |
+ synced=False,
|
| |
+ )
|
| |
|
| |
# Query the "package pages" API for the current active Y-stream release
|
| |
request_params = {
|
| |
Signed-off-by: Stephen Gallagher sgallagh@redhat.com