Skip to content

Commit

Permalink
Fixing novaclient_converter NameError
Browse files Browse the repository at this point in the history
bug 909772

Change-Id: Iac7b45648cd1c85fdc3c8febbd0ef69b63a70c92
  • Loading branch information
Brian Waldon committed Dec 29, 2011
1 parent 4ea63c4 commit e135f93
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
8 changes: 0 additions & 8 deletions nova/api/openstack/v2/servers.py
Expand Up @@ -41,14 +41,6 @@
FLAGS = flags.FLAGS


class ConvertedException(exc.WSGIHTTPException):
def __init__(self, code, title, explanation):
self.code = code
self.title = title
self.explanation = explanation
super(ConvertedException, self).__init__()


class Controller(wsgi.Controller):
""" The Server API base controller class for the OpenStack API """

Expand Down
9 changes: 9 additions & 0 deletions nova/exception.py
Expand Up @@ -28,12 +28,21 @@
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.
Expand Down

0 comments on commit e135f93

Please sign in to comment.