Use message when creating Unauthorized exception

The Unauthorized exception was being created with an underlying
exception as its message instead of that underlying exception's message,
such that it can be translated.

Change-Id: I57a7729d2416dda8098da2ea67e867cad31ff83b
Partial-Bug: #1274638
This commit is contained in:
Luis A. Garcia 2014-01-30 19:07:54 +00:00
parent 66b1a22bd1
commit b0a01de64e
1 changed files with 1 additions and 1 deletions

View File

@ -270,7 +270,7 @@ class Auth(controller.V2Controller):
user_id=user_id,
password=password)
except AssertionError as e:
raise exception.Unauthorized(e)
raise exception.Unauthorized(e.args[0])
metadata_ref = {}
tenant_id = self._get_project_id_from_auth(auth)