]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Fix auth failed exception handler
authorIan Main <imain@redhat.com>
Wed, 30 May 2012 17:46:15 +0000 (10:46 -0700)
committerIan Main <imain@redhat.com>
Wed, 30 May 2012 17:46:59 +0000 (10:46 -0700)
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>
heat/common/client.py

index 5491b8f3fbc8a6d30aee320376950c2dc1177a7f..be465c85b547507a2c5dddf055a10bbd7522ffbf 100644 (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: