Skip to content

Commit

Permalink
kolla-images.py: Remove unnecessary strips, support unmaintained bran…
Browse files Browse the repository at this point in the history
…ches
  • Loading branch information
markgoddard committed Jan 29, 2024
1 parent ae21932 commit 82a194a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tools/kolla-images.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,11 @@ def get_openstack_release() -> str:
if "=" not in line:
continue
key, value = line.split("=")
if key.strip().strip() == "defaultbranch":
value = value.strip().rstrip()
prefix = "stable/"
assert value.startswith(prefix)
return value[len(prefix):]
if key.strip() == "defaultbranch":
value = value.strip()
for prefix in ("stable/", "unmaintained/"):
if value.startswith(prefix):
return value[len(prefix):]
raise Exception("Failed to determine OpenStack release")


Expand Down

0 comments on commit 82a194a

Please sign in to comment.