Clean imports in code
In some part in the code we import objects. In the Openstack style guidelines they recommand to import only modules. We need to fix that. Change-Id: I4bfee2b94d101940d615f78f9bebb83310ed90ba Partial-Bug:1543101
This commit is contained in:
committed by
Vincent Françoise
parent
e3198d25a5
commit
5baff7dc3e
@@ -16,7 +16,7 @@
|
||||
|
||||
from oslo_log import log
|
||||
|
||||
from watcher.decision_engine.messaging.events import Events
|
||||
from watcher.decision_engine.messaging import events as messaging_events
|
||||
|
||||
LOG = log.getLogger(__name__)
|
||||
|
||||
@@ -43,8 +43,8 @@ class EventDispatcher(object):
|
||||
"""
|
||||
Dispatch an instance of Event class
|
||||
"""
|
||||
if Events.ALL in self._events.keys():
|
||||
listeners = self._events[Events.ALL]
|
||||
if messaging_events.Events.ALL in self._events.keys():
|
||||
listeners = self._events[messaging_events.Events.ALL]
|
||||
for listener in listeners:
|
||||
listener(event)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user