From de7c08d5b9ab240328609ebcfa4648e0d6f7f0ab Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Thu, 30 Jul 2026 16:06:23 +0200 Subject: Allow lowercase from Change-Id: I42cf2aac795e9f61692deec956de0bedab55086f Signed-off-by: Michal Nasiadka --- kolla/image/kolla_worker.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'kolla/image') diff --git a/kolla/image/kolla_worker.py b/kolla/image/kolla_worker.py index b54e81bea..36910e10a 100644 --- a/kolla/image/kolla_worker.py +++ b/kolla/image/kolla_worker.py @@ -422,7 +422,7 @@ class KollaWorker(object): if pip_args: lines = content.split('\n') for i, line in enumerate(lines): - if line.startswith('FROM '): + if re.match(r'^FROM\s', line, re.IGNORECASE): lines[i + 1:i + 1] = pip_args break content = '\n'.join(lines) @@ -755,7 +755,8 @@ class KollaWorker(object): image_name = os.path.basename(path) canonical_name = (self.namespace + '/' + self.image_prefix + image_name + ':' + self.tag) - parent_search_pattern = re.compile(r'^FROM.*$', re.MULTILINE) + parent_search_pattern = re.compile(r'^FROM.*$', + re.MULTILINE | re.IGNORECASE) match = re.search(parent_search_pattern, content) if match: parent_name = match.group(0).split(' ')[1] -- cgit v1.2.3