diff options
Diffstat (limited to 'openstack/common/exception.py')
-rw-r--r-- | openstack/common/exception.py | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/openstack/common/exception.py b/openstack/common/exception.py index e8ea110..e5da94b 100644 --- a/openstack/common/exception.py +++ b/openstack/common/exception.py @@ -146,20 +146,3 @@ class MalformedRequestBody(OpenstackException): class InvalidContentType(OpenstackException): message = "Invalid content type %(content_type)s" - - -def get_context_from_function_and_args(function, args, kwargs): - """Find an arg of type RequestContext and return it. - - This is useful in a couple of decorators where we don't - know much about the function we're wrapping. - """ - - # import here to avoid circularity: - from openstack.common import context - - for arg in itertools.chain(kwargs.values(), args): - if isinstance(arg, context.RequestContext): - return arg - - return None |