Merge lp://qastaging/~psivaa/utah/bug-1343881 into lp://qastaging/utah

Proposed by Para Siva
Status: Merged
Merged at revision: 1056
Proposed branch: lp://qastaging/~psivaa/utah/bug-1343881
Merge into: lp://qastaging/utah
Diff against target: 43 lines (+12/-5)
1 file modified
utah/isotest/iso_static_validation.py (+12/-5)
To merge this branch: bzr merge lp://qastaging/~psivaa/utah/bug-1343881
Reviewer Review Type Date Requested Status
Jean-Baptiste Lallement Needs Fixing
Paul Larson Approve
Review via email: mp+227294@code.qastaging.launchpad.net

Commit message

Description of the change

Fix for bug https://bugs.launchpad.net/utah/+bug/1343881. Skip inserting the release name in the cdimage url only for devel release.

To post a comment you must log in.
Revision history for this message
Paul Larson (pwlars) wrote :

Convert to use distro_info instead please (see: python-distro-info, I think it's used elsewhere in utah probably). This would be more pythonic, and probably a bit more concise as well.

review: Needs Fixing
1053. By Para Siva

Fixes with python-distro-info

Revision history for this message
Paul Larson (pwlars) wrote :

looks ok to me

review: Approve
1054. By Para Siva

Include UbuntuDistroInfo inside try catch

1055. By Para Siva

log the errors during distro info finding

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

In the following code:

17 + try:
18 + ubuntu_distro = distro_info.UbuntuDistroInfo()
19 + except Exception as e:
20 + logging.error("Can not find distro info %s", e.message)
21 +
22 + if self.st_release != ubuntu_distro.devel():
23 + self.url = os.path.join(DEFAULT_URL, self.st_release)
24 + else:

If distro info data is obsolete, ubuntu_distro will be undefined and the rest of the code will fail. I'd rather do:
try:
    ubuntu_distro_devel = distro_info.UbuntuDistroInfo().devel()
except:
    logging.error(...)
    exit

A fallback to a default distro might also be an option but it'll require to update the code every new release.

review: Needs Fixing
1056. By Para Siva

Review comment fix- phase 2

Revision history for this message
Para Siva (psivaa) wrote :

Thanks for the comments again jibel. Fixed it. Could you pls take a look at rev 1056?

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: