Merge "Improve the log to avoid unexpected ERROR"

This commit is contained in:
Jenkins 2016-05-30 06:50:38 +00:00 committed by Gerrit Code Review
commit dfa5493a73

View File

@ -37,12 +37,11 @@ class NotifierDriver(object):
def post(self, queue_name, messages, client_uuid, project=None):
"""Send messages to the subscribers."""
if (self.subscription_controller and
not isinstance(self.subscription_controller,
pooling.SubscriptionController)):
if self.subscription_controller:
if not isinstance(self.subscription_controller,
pooling.SubscriptionController):
subscribers = self.subscription_controller.list(queue_name,
project)
for sub in next(subscribers):
s_type = urllib_parse.urlparse(sub['subscriber']).scheme
data_driver = self.subscription_controller.driver