Ryan Lee has proposed merging ~rlee287/ubuntu-qa-tools:uvt_regex_fix into ubuntu-qa-tools:master.
Requested reviews: Alex Murray (alexmurray) For more details, see: https://code.launchpad.net/~rlee287/ubuntu-qa-tools/+git/ubuntu-qa-tools/+merge/471279 Fixes a bug in the regex used by UVT to select the right Ubuntu image to download for new 24.04 VMs -- Your team Ubuntu Bug Control is subscribed to branch ubuntu-qa-tools:master.
diff --git a/vm-tools/uvt b/vm-tools/uvt index 36a3c31..2d645e7 100755 --- a/vm-tools/uvt +++ b/vm-tools/uvt @@ -3029,13 +3029,16 @@ def find_latest_release(release_num, iso_type): print("Could not reach web server! Please download manually.") sys.exit(1) - matches = re.findall(re.escape(release_num) + r"\.\d+", html) - if len(matches) > 0: - latest_release = sorted(matches)[-1] - print("Found release %s" % latest_release) - return latest_release - - print("Could not find release to download! Please download manually.") + # first try looking for any point release and then fallback to the original + # release + for needle in [re.escape(release_num) + r"\.\d+", re.escape(release_num)]: + matches = re.findall(needle , html) + if len(matches) > 0: + latest_release = sorted(matches)[-1] + print("Found release %s" % latest_release) + return latest_release + + print("Could not find release to download for %s %s! Please download manually." % (release_num, iso_type)) sys.exit(1) def check_vm_exists(vm_name, fail=False):
_______________________________________________ Mailing list: https://launchpad.net/~ubuntu-bugcontrol Post to : ubuntu-bugcontrol@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-bugcontrol More help : https://help.launchpad.net/ListHelp