Fixing novaclient_converter NameError
bug 909772 Change-Id: Iac7b45648cd1c85fdc3c8febbd0ef69b63a70c92
This commit is contained in:
@@ -28,12 +28,21 @@ from functools import wraps
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
from novaclient import exceptions as novaclient_exceptions
|
from novaclient import exceptions as novaclient_exceptions
|
||||||
|
import webob.exc
|
||||||
|
|
||||||
from nova import log as logging
|
from nova import log as logging
|
||||||
|
|
||||||
LOG = logging.getLogger('nova.exception')
|
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):
|
def novaclient_converter(f):
|
||||||
"""Convert novaclient ClientException HTTP codes to webob exceptions.
|
"""Convert novaclient ClientException HTTP codes to webob exceptions.
|
||||||
Has to be the outer-most decorator.
|
Has to be the outer-most decorator.
|
||||||
|
Reference in New Issue
Block a user