Merge lp:~jtran/nova/lp702580 into lp:~hudson-openstack/nova/trunk
Proposed by
John Tran
Status: | Merged |
---|---|
Approved by: | Devin Carlen |
Approved revision: | 854 |
Merged at revision: | 1072 |
Proposed branch: | lp:~jtran/nova/lp702580 |
Merge into: | lp:~hudson-openstack/nova/trunk |
Diff against target: |
30 lines (+20/-0) 1 file modified
nova/tests/test_cloud.py (+20/-0) |
To merge this branch: | bzr merge lp:~jtran/nova/lp702580 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brian Waldon (community) | Needs Fixing | ||
termie (community) | Approve | ||
Devin Carlen (community) | Approve | ||
Vish Ishaya (community) | Approve | ||
Review via email: mp+55209@code.launchpad.net |
Commit message
Adds proper error handling for images that can't be found and a test for deregister image.
To post a comment you must log in.
Merge conflict:
37 +<<<<<<< TREE
38 +=======
39 +from nova.objectstore import image
40 +from nova.exception import NotEmpty, NotFound
41 +>>>>>>> MERGE-SOURCE
I don't think this is a good way to handle raising the exception. You lose the underlying stack trace this way and I'm not sure what value catching and raising a new exception of the same type is.
21 + try: image(context, image_id) NotFound( _('Image %s not found') %
22 + image = self._get_
23 + except exception.NotFound:
24 + raise exception.
25 + image_id)
Looks like the best way to handle would be to fix the underlying exceptions being raised.