]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Pass an empty context to the notifier
authorFlavio Percoco <flaper87@gmail.com>
Fri, 22 Aug 2014 16:33:07 +0000 (18:33 +0200)
committerFlavio Percoco <flaper87@gmail.com>
Mon, 25 Aug 2014 06:51:48 +0000 (08:51 +0200)
The notifier API expects a context as a first parameter. During the port
to oslo.messaging, a bug was introduced here and the first argument in
the notifier call was removed. This patch puts it back.

Change-Id: Id2f47757ee4af8f8c39a8a1e6b11dcad163f5b7b
Closes-bug: #1346466

cinder/openstack/common/log_handler.py

index 37a7195dd4f3027e5cf2bdefca138a05052eaf3b..dcda5db2dfb6711d063f6cec65ec96bc4547f74a 100644 (file)
@@ -25,5 +25,6 @@ class PublishErrorsHandler(logging.Handler):
         if ('cinder.openstack.common.notifier.log_notifier' in
                 cfg.CONF.notification_driver):
             return
-        rpc.get_notifier('error.publisher').info('error_notification',
-                                                 dict(error=record.msg))
+        msg = record.getMessage()
+        rpc.get_notifier('error.publisher').error(None, 'error_notification',
+                                                  dict(error=msg))