diff options
| author | Andrew Bogott <abogott@wikimedia.org> | 2012-07-02 16:28:05 -0500 |
|---|---|---|
| committer | Andrew Bogott <abogott@wikimedia.org> | 2012-07-03 17:38:37 -0500 |
| commit | d9e28ba02c30255511a56a59e93da283c172dffe (patch) | |
| tree | b509f07af5400eea1993b19bee0a492265f29674 /openstack/common/notifier/api.py | |
| parent | 506486550480fb222a92447e1e8baca855d126aa (diff) | |
| download | oslo-d9e28ba02c30255511a56a59e93da283c172dffe.tar.gz oslo-d9e28ba02c30255511a56a59e93da283c172dffe.tar.xz oslo-d9e28ba02c30255511a56a59e93da283c172dffe.zip | |
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
Diffstat (limited to 'openstack/common/notifier/api.py')
| -rw-r--r-- | openstack/common/notifier/api.py | 7 |
1 files changed, 3 insertions, 4 deletions
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, |
