From c8773b80a12b334ccd77d414cb198353f44e27bf Mon Sep 17 00:00:00 2001 From: Brian Waldon Date: Thu, 29 Dec 2011 10:57:38 -0500 Subject: [PATCH] Fixing novaclient_converter NameError bug 909772 Change-Id: Iac7b45648cd1c85fdc3c8febbd0ef69b63a70c92 --- nova/exception.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nova/exception.py b/nova/exception.py index 95e34afe2..186a6ac58 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -28,12 +28,21 @@ from functools import wraps import sys from novaclient import exceptions as novaclient_exceptions +import webob.exc from nova import log as logging LOG = logging.getLogger('nova.exception') +class ConvertedException(webob.exc.WSGIHTTPException): + def __init__(self, code=0, title="", explanation=""): + self.code = code + self.title = title + self.explanation = explanation + super(ConvertedException, self).__init__() + + def novaclient_converter(f): """Convert novaclient ClientException HTTP codes to webob exceptions. Has to be the outer-most decorator.