]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Remove unused wrap_errors decorator
authorMark McLoughlin <markmc@redhat.com>
Tue, 17 Jul 2012 03:18:40 +0000 (04:18 +0100)
committerMark McLoughlin <markmc@redhat.com>
Tue, 17 Jul 2012 03:18:40 +0000 (04:18 +0100)
Only used by rescue extension in nova.

Change-Id: I3ade99405736bf8ffb8891a8d53c02905501ae44

cinder/api/openstack/extensions.py

index baa9510b6535aa9696f40b5d6539dce6d5849b76..c7bce4b8377d0e374c1d6e6817308757ca85005d 100644 (file)
@@ -297,18 +297,6 @@ class ResourceExtension(object):
         self.custom_routes_fn = custom_routes_fn
 
 
-def wrap_errors(fn):
-    """Ensure errors are not passed along."""
-    def wrapped(*args, **kwargs):
-        try:
-            return fn(*args, **kwargs)
-        except webob.exc.HTTPException:
-            raise
-        except Exception:
-            raise webob.exc.HTTPInternalServerError()
-    return wrapped
-
-
 def load_standard_extensions(ext_mgr, logger, path, package, ext_list=None):
     """Registers all standard API extensions."""