diff options
| author | Jay Pipes <jaypipes@gmail.com> | 2012-12-26 14:53:53 -0500 |
|---|---|---|
| committer | Jay Pipes <jaypipes@gmail.com> | 2012-12-26 14:53:53 -0500 |
| commit | fa16f2b68603be04cb5f4e915625181ac6c119eb (patch) | |
| tree | a59e66df652510c156538bbc9b5a8b056d30b00c /nova/api | |
| parent | 5f697f64e5c445ba1b62c82d9167fd6b9c7256d2 (diff) | |
| download | nova-fa16f2b68603be04cb5f4e915625181ac6c119eb.tar.gz nova-fa16f2b68603be04cb5f4e915625181ac6c119eb.tar.xz nova-fa16f2b68603be04cb5f4e915625181ac6c119eb.zip | |
Remove improper NotFound except block in list servers
Added a couple tests to verify that NotFound was actually
never raised when no results are returned from list servers
or list servers details, and then removed the except blocks
from the controller.
Change-Id: I36856066b9e4c4e3f7b85ddf8facb35204034838
fixes: lp bug #1089385
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/servers.py | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py index a62740681..c36d53993 100644 --- a/nova/api/openstack/compute/servers.py +++ b/nova/api/openstack/compute/servers.py @@ -452,9 +452,6 @@ class Controller(wsgi.Controller): servers = self._get_servers(req, is_detail=False) except exception.Invalid as err: raise exc.HTTPBadRequest(explanation=str(err)) - except exception.NotFound: - msg = _("Instance could not be found") - raise exc.HTTPNotFound(explanation=msg) return servers @wsgi.serializers(xml=ServersTemplate) @@ -464,9 +461,6 @@ class Controller(wsgi.Controller): servers = self._get_servers(req, is_detail=True) except exception.Invalid as err: raise exc.HTTPBadRequest(explanation=str(err)) - except exception.NotFound as err: - msg = _("Instance could not be found") - raise exc.HTTPNotFound(explanation=msg) return servers def _add_instance_faults(self, ctxt, instances): |
