From d9e28ba02c30255511a56a59e93da283c172dffe Mon Sep 17 00:00:00 2001 From: Andrew Bogott Date: Mon, 2 Jul 2012 16:28:05 -0500 Subject: Move get_context_from_function_and_args() to context.py Word on the street is that exception.py may soon be deprecated, and context.py is a better place anyway. (Also removed an import of utils.py because /it/ imports exception.py.) Change-Id: I856fc6f4558cc01ddca350ee4cfd4684db47475b --- openstack/common/notifier/api.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'openstack/common/notifier/api.py') diff --git a/openstack/common/notifier/api.py b/openstack/common/notifier/api.py index 6a46cd2..45af4ed 100644 --- a/openstack/common/notifier/api.py +++ b/openstack/common/notifier/api.py @@ -17,12 +17,11 @@ import inspect import uuid from openstack.common import cfg -from openstack.common import exception +from openstack.common import context from openstack.common import importutils from openstack.common import jsonutils from openstack.common import log as logging from openstack.common import timeutils -from openstack.common import utils LOG = logging.getLogger(__name__) @@ -72,8 +71,8 @@ def notify_decorator(name, fn): for key in kwarg: body['kwarg'][key] = kwarg[key] - context = exception.get_context_from_function_and_args(fn, args, kwarg) - notify(context, + ctxt = context.get_context_from_function_and_args(fn, args, kwarg) + notify(ctxt, CONF.default_publisher_id, name, CONF.default_notification_level, -- cgit