Raise correct error when api.tacker.get_vnf fail

When api.tacker.get_vnf fail with not found error, raise a correct
error for handler(i.e. django.http.Http404)

Change-Id: Ib3b251a59e4306a73f02e56404ee64cea5133471
Related-Bug: #1554663
This commit is contained in:
dharmendra 2016-04-25 17:33:03 +05:30
parent cec7bacc13
commit f51ec2cf36
1 changed files with 3 additions and 2 deletions

View File

@ -23,6 +23,7 @@ from horizon import tables
from openstack_dashboard import policy
from tacker_horizon.openstack_dashboard import api
from tackerclient.common.exceptions import NotFound
class VNFManagerItem(object):
@ -130,8 +131,8 @@ class VNFUpdateRow(tables.Row):
item.status = vnf['status']
item.stack_status = vnf['status']
return item
except Http404:
raise
except (Http404, NotFound):
raise Http404
except Exception as e:
messages.error(request, e)
raise