Fix auth failed exception handler

This patch fixes the auth failed exception handler so that we
get back a meaningful result when authentication fails.

Change-Id: I2f37daed3890fd685fa6f701938b675460e76b0c
Signed-off-by: Ian Main <imain@redhat.com>
This commit is contained in:
Ian Main 2012-05-30 10:46:15 -07:00
parent daa2c72f0c
commit a093e6d074
1 changed files with 2 additions and 2 deletions

View File

@ -529,9 +529,9 @@ class BaseClient(object):
elif status_code in self.REDIRECT_RESPONSE_CODES:
raise exception.RedirectException(res.getheader('Location'))
elif status_code == httplib.UNAUTHORIZED:
raise exception.NotAuthorized(res.read())
raise exception.NotAuthorized()
elif status_code == httplib.FORBIDDEN:
raise exception.NotAuthorized(res.read())
raise exception.NotAuthorized()
elif status_code == httplib.NOT_FOUND:
raise exception.NotFound(res.read())
elif status_code == httplib.CONFLICT: