diff options
| author | Yaguang Tang <heut2008@gmail.com> | 2012-06-30 02:13:05 +0800 |
|---|---|---|
| committer | Yaguang Tang <heut2008@gmail.com> | 2012-07-18 11:40:09 +0800 |
| commit | d5f2152dcfc4039de8324bdf75f6a2cd844dbdd0 (patch) | |
| tree | 3614b8d9bfe55bdebddc700c06ffb8fc45e76e92 /openstack/common/notifier/api.py | |
| parent | ace759e55d7c87dc66a500d598d1355dd3c0408f (diff) | |
| download | oslo-d5f2152dcfc4039de8324bdf75f6a2cd844dbdd0.tar.gz oslo-d5f2152dcfc4039de8324bdf75f6a2cd844dbdd0.tar.xz oslo-d5f2152dcfc4039de8324bdf75f6a2cd844dbdd0.zip | |
fix bug lp:1019348,update openstack-common to support pep8 1.3.
also,this patch turns off pep8 E125 check.
Change-Id: I22d2a94d89530586d614af39af17ae542c5e0cbf
Diffstat (limited to 'openstack/common/notifier/api.py')
| -rw-r--r-- | openstack/common/notifier/api.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/openstack/common/notifier/api.py b/openstack/common/notifier/api.py index f01d11e..e699620 100644 --- a/openstack/common/notifier/api.py +++ b/openstack/common/notifier/api.py @@ -37,7 +37,7 @@ notifier_opts = [ cfg.StrOpt('default_publisher_id', default='$host', help='Default publisher_id for outgoing notifications'), - ] +] CONF = cfg.CONF CONF.register_opts(notifier_opts) @@ -122,21 +122,21 @@ def notify(context, publisher_id, event_type, priority, payload): """ if priority not in log_levels: raise BadPriorityException( - _('%s not in valid priorities') % priority) + _('%s not in valid priorities') % priority) # Ensure everything is JSON serializable. payload = jsonutils.to_primitive(payload, convert_instances=True) driver = importutils.import_module(CONF.notification_driver) msg = dict(message_id=str(uuid.uuid4()), - publisher_id=publisher_id, - event_type=event_type, - priority=priority, - payload=payload, - timestamp=str(timeutils.utcnow())) + publisher_id=publisher_id, + event_type=event_type, + priority=priority, + payload=payload, + timestamp=str(timeutils.utcnow())) try: driver.notify(context, msg) except Exception, e: LOG.exception(_("Problem '%(e)s' attempting to " "send to notification system. Payload=%(payload)s") % - locals()) + locals()) |
