diff --git a/keystoneclient/exceptions.py b/keystoneclient/exceptions.py index d01f3d290..f992ff306 100644 --- a/keystoneclient/exceptions.py +++ b/keystoneclient/exceptions.py @@ -95,6 +95,14 @@ class HTTPNotImplemented(ClientException): message = "Not Implemented" +class ServiceUnavailable(ClientException): + """ + HTTP 503 - Service Unavailable: The server is currently unavailable. + """ + http_status = 503 + message = "Service Unavailable" + + # In Python 2.4 Exception is old-style and thus doesn't have a __subclasses__() # so we can do this: # _code_map = dict((c.http_status, c) @@ -106,7 +114,8 @@ _code_map = dict((c.http_status, c) for c in [BadRequest, Forbidden, NotFound, OverLimit, - HTTPNotImplemented]) + HTTPNotImplemented, + ServiceUnavailable]) def from_response(response, body):