diff --git a/nova/api/ec2/__init__.py b/nova/api/ec2/__init__.py index f17eb2c7f54c..68289d9a0418 100644 --- a/nova/api/ec2/__init__.py +++ b/nova/api/ec2/__init__.py @@ -157,7 +157,7 @@ class Lockout(wsgi.Middleware): failures = int(self.mc.get(failures_key) or 0) if failures >= CONF.lockout_attempts: detail = _("Too many failed authentications.") - raise webob.exc.HTTPForbidden(detail=detail) + raise webob.exc.HTTPForbidden(explanation=detail) res = req.get_response(self.application) if res.status_int == 403: failures = self.mc.incr(failures_key) @@ -303,7 +303,7 @@ class Requestify(wsgi.Middleware): if expired: msg = _("Timestamp failed validation.") LOG.exception(msg) - raise webob.exc.HTTPForbidden(detail=msg) + raise webob.exc.HTTPForbidden(explanation=msg) # Raise KeyError if omitted action = req.params['Action'] diff --git a/nova/wsgi.py b/nova/wsgi.py index d00e6ce9a544..9522028c630f 100644 --- a/nova/wsgi.py +++ b/nova/wsgi.py @@ -285,7 +285,7 @@ class Application(object): res = 'message\n' # Option 2: a nicely formatted HTTP exception page - res = exc.HTTPForbidden(detail='Nice try') + res = exc.HTTPForbidden(explanation='Nice try') # Option 3: a webob Response object (in case you need to play with # headers, or you want to be treated like an iterable, or or or)