Fixing novaclient_converter NameError

bug 909772

Change-Id: Iac7b45648cd1c85fdc3c8febbd0ef69b63a70c92
This commit is contained in:
Brian Waldon
2011-12-29 10:57:38 -05:00
parent c4462da2e0
commit c8773b80a1

View File

@@ -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.