Merge ~jslarraz/ubuntu-qa-tools:fix-find-latest-release-iso into ubuntu-qa-tools:master

Proposed by Jorge Sancho Larraz
Status: Needs review
Proposed branch: ~jslarraz/ubuntu-qa-tools:fix-find-latest-release-iso
Merge into: ubuntu-qa-tools:master
Diff against target: 13 lines (+1/-1)
1 file modified
vm-tools/uvt (+1/-1)
Reviewer Review Type Date Requested Status
Ubuntu Bug Control Pending
Review via email: mp+465786@code.launchpad.net

Commit message

find_latest_release assumed the iso name to be x.x.x what is not true for the first version on every release. Fixing regular expression

To post a comment you must log in.

Unmerged commits

416a8f6... by Jorge Sancho Larraz

fix find_latest_release

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/vm-tools/uvt b/vm-tools/uvt
2index 36a3c31..ef7b8ba 100755
3--- a/vm-tools/uvt
4+++ b/vm-tools/uvt
5@@ -3029,7 +3029,7 @@ def find_latest_release(release_num, iso_type):
6 print("Could not reach web server! Please download manually.")
7 sys.exit(1)
8
9- matches = re.findall(re.escape(release_num) + r"\.\d+", html)
10+ matches = re.findall(re.escape(release_num) + r"(?:\.\d+)?", html)
11 if len(matches) > 0:
12 latest_release = sorted(matches)[-1]
13 print("Found release %s" % latest_release)

Subscribers

People subscribed via source and target branches