diff options
| author | Naveed Massjouni <naveedm9@gmail.com> | 2011-03-17 13:52:09 -0400 |
|---|---|---|
| committer | Naveed Massjouni <naveedm9@gmail.com> | 2011-03-17 13:52:09 -0400 |
| commit | 866845870f71f08203d0b29e9f35ecd5eec44151 (patch) | |
| tree | 350677fa9484c395630c8d6e8f448fe827b1953e | |
| parent | a48ff163dd30c10753666d3542bec640d2ac8da4 (diff) | |
| parent | 5473f3a47c1b11c6625960e1ed73c28c7b061fcb (diff) | |
| download | nova-866845870f71f08203d0b29e9f35ecd5eec44151.tar.gz nova-866845870f71f08203d0b29e9f35ecd5eec44151.tar.xz nova-866845870f71f08203d0b29e9f35ecd5eec44151.zip | |
moving code out of try/except that would never trigger NotFound
| -rw-r--r-- | nova/api/openstack/servers.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nova/api/openstack/servers.py b/nova/api/openstack/servers.py index cfbcdc305..073c6585a 100644 --- a/nova/api/openstack/servers.py +++ b/nova/api/openstack/servers.py @@ -59,11 +59,12 @@ class Controller(wsgi.Controller): def ips(self, req, id): try: instance = self.compute_api.get(req.environ['nova.context'], id) - builder = addresses_views.get_view_builder(req) - return builder.build(instance) except exception.NotFound: return faults.Fault(exc.HTTPNotFound()) + builder = addresses_views.get_view_builder(req) + return builder.build(instance) + def index(self, req): """ Returns a list of server names and ids for a given user """ return self._items(req, is_detail=False) |
