Skip to content

Commit 82a194a

Browse files
committed
kolla-images.py: Remove unnecessary strips, support unmaintained branches
1 parent ae21932 commit 82a194a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tools/kolla-images.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,11 @@ def get_openstack_release() -> str:
209209
if "=" not in line:
210210
continue
211211
key, value = line.split("=")
212-
if key.strip().strip() == "defaultbranch":
213-
value = value.strip().rstrip()
214-
prefix = "stable/"
215-
assert value.startswith(prefix)
216-
return value[len(prefix):]
212+
if key.strip() == "defaultbranch":
213+
value = value.strip()
214+
for prefix in ("stable/", "unmaintained/"):
215+
if value.startswith(prefix):
216+
return value[len(prefix):]
217217
raise Exception("Failed to determine OpenStack release")
218218

219219

0 commit comments

Comments
 (0)