fix inline multiple assignment

cdent took me to school: multiple inline assignments will share
same target and this is bad. this patch applies the lesson i've
been taught

Change-Id: I8b4767597796474f1923e872f4fe0692f3da9fda
Closes-Bug: #1424807
This commit is contained in:
gordon chung 2015-02-23 15:10:33 -05:00
parent e9d4e1eb2d
commit ca3c6d079b
3 changed files with 5 additions and 4 deletions

View File

@ -73,7 +73,7 @@ class NotificationService(os_service.Service):
def __init__(self, *args, **kwargs):
super(NotificationService, self).__init__(*args, **kwargs)
self.partition_coordinator = None
self.listeners = self.pipeline_listeners = []
self.listeners, self.pipeline_listeners = [], []
self.group_id = None
@classmethod
@ -127,7 +127,7 @@ class NotificationService(os_service.Service):
event_transporter = self.event_pipeline_manager
self.group_id = None
self.listeners = self.pipeline_listeners = []
self.listeners, self.pipeline_listeners = [], []
self._configure_main_queue_listeners(transporter, event_transporter)
if cfg.CONF.notification.workload_partitioning:

View File

@ -35,7 +35,8 @@ class EventTestBase(v2.FunctionalTest,
def _generate_models(self):
event_models = []
base = 0
self.s_time = self.trait_time = datetime.datetime(2013, 12, 31, 5, 0)
self.s_time = datetime.datetime(2013, 12, 31, 5, 0)
self.trait_time = datetime.datetime(2013, 12, 31, 5, 0)
for event_type in ['Foo', 'Bar', 'Zoo']:
trait_models = [models.Trait(name, type, value)
for name, type, value in [

View File

@ -221,7 +221,7 @@ class BaseRealNotification(tests_base.BaseTestCase):
len(self.publisher.events) >= self.expected_events):
break
eventlet.sleep(0)
self.assertNotEqual(self.srv.listeners, self.srv.pipeline_listeners)
self.srv.stop()
resources = list(set(s.resource_id for s in self.publisher.samples))