From 82a194a9f6c8daad500712fea988b4a9a88ce272 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Mon, 29 Jan 2024 14:35:05 +0000 Subject: [PATCH] kolla-images.py: Remove unnecessary strips, support unmaintained branches --- tools/kolla-images.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/kolla-images.py b/tools/kolla-images.py index f30b989b5..f2c69e27e 100755 --- a/tools/kolla-images.py +++ b/tools/kolla-images.py @@ -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")