Merge lp:~joetalbott/utah/add_product_uuid into lp:utah
Proposed by
Joe Talbott
Status: | Merged |
---|---|
Approved by: | Javier Collado |
Approved revision: | 724 |
Merged at revision: | 726 |
Proposed branch: | lp:~joetalbott/utah/add_product_uuid |
Merge into: | lp:utah |
Diff against target: |
86 lines (+39/-2) 2 files modified
utah/client/common.py (+29/-2) utah/client/tests/test_common.py (+10/-0) |
To merge this branch: | bzr merge lp:~joetalbott/utah/add_product_uuid |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Javier Collado (community) | Approve | ||
Joe Talbott (community) | Needs Resubmitting | ||
Review via email:
|
Description of the change
Add product_uuid for machine under test to the result packet.
To post a comment you must log in.
To read files I like to use a context manager to guarantee that the file is closed:
with open(filename) as f:
product_uuid = f.read().strip()
Besides this, I'm not sure about the expected UUID format, but maybe using a regular
expression is a good idea.
Finally, when is the IOError expected to happen? If it's related to permissions,
then checking the permissions before opening the file might be clearer and explicit.