diff options
| author | Brian Waldon <brian.waldon@rackspace.com> | 2011-04-22 18:21:32 +0000 |
|---|---|---|
| committer | Tarmac <> | 2011-04-22 18:21:32 +0000 |
| commit | 7e01d47e887fe96b997ba16013022112d71ea62a (patch) | |
| tree | af694b980312da8eb2189c3f4346c9b5f473a562 /nova/api | |
| parent | f2ed04d5a0034328bb02a1cb81784f8956652052 (diff) | |
| parent | 7168812fdf56280f24dc977c5dd9c7a73959c2a2 (diff) | |
Refactoring nova.exception.Invalid usage
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/servers.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/nova/api/openstack/servers.py b/nova/api/openstack/servers.py index 415c0995f..88128fd1f 100644 --- a/nova/api/openstack/servers.py +++ b/nova/api/openstack/servers.py @@ -564,9 +564,8 @@ class Controller(common.OpenstackController): """ image_id = image_meta['id'] if image_meta['status'] != 'active': - raise exception.Invalid( - _("Cannot build from image %(image_id)s, status not active") % - locals()) + raise exception.ImageUnacceptable(image_id=image_id, + reason=_("status is not active")) if image_meta.get('container_format') != 'ami': return None, None |
