Return 404 rather than ValueError

The get_service function returns ValueError
when the service response is neither cinder
nor glance. Switch this over to abort 404.

Closes-Bug: #1700144
Change-Id: If2cf585dd555eab4771a27fe6f272842a3d498fe
This commit is contained in:
ltomatsu 2017-06-30 16:29:45 +00:00 committed by Leo Tomatsu
parent cc013105f0
commit 199dbbaea8
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ def get_service(a):
if service in ['image', 'volume']:
return service
else:
raise ValueError
abort(404)
def get_details(method, path, headers):