daemon: Use a set to store broker handlers.
This commit is contained in:
parent
bcd749578d
commit
31a9f6fb34
5 changed files with 5 additions and 5 deletions
|
@ -54,7 +54,7 @@ class CoreBroker(ConfigurableManager):
|
|||
# list of node numbers that are PhysicalNode nodes
|
||||
self.phys = []
|
||||
# allows for other message handlers to process API messages (e.g. EMANE)
|
||||
self.handlers = ()
|
||||
self.handlers = set()
|
||||
# dict with tunnel key to tunnel device mapping
|
||||
self.tunnels = {}
|
||||
self.dorecvloop = False
|
||||
|
|
|
@ -67,7 +67,7 @@ class Emane(ConfigurableManager):
|
|||
self.logversion()
|
||||
# model for global EMANE configuration options
|
||||
self.emane_config = EmaneGlobalModel(session, None, self.verbose)
|
||||
session.broker.handlers += (self.handledistributed, )
|
||||
session.broker.handlers.add(self.handledistributed)
|
||||
self.loadmodels()
|
||||
self.service = None
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ class MobilityManager(ConfigurableManager):
|
|||
# dummy node objects for tracking position of nodes on other servers
|
||||
self.phys = {}
|
||||
self.physnets = {}
|
||||
self.session.broker.handlers += (self.physnodehandlelink, )
|
||||
self.session.broker.handlers.add(self.physnodehandlelink)
|
||||
self.register()
|
||||
|
||||
def startup(self, nodenums=None):
|
||||
|
|
|
@ -50,7 +50,7 @@ class Sdt(object):
|
|||
# node information for remote nodes not in session._objs
|
||||
# local nodes also appear here since their obj may not exist yet
|
||||
self.remotes = {}
|
||||
session.broker.handlers += (self.handledistributed, )
|
||||
session.broker.handlers.add(self.handledistributed)
|
||||
|
||||
def is_enabled(self):
|
||||
''' Check for 'enablesdt' session option. Return False by default if
|
||||
|
|
|
@ -1132,7 +1132,7 @@ class SessionConfig(ConfigurableManager, Configurable):
|
|||
|
||||
def __init__(self, session):
|
||||
ConfigurableManager.__init__(self, session)
|
||||
session.broker.handlers += (self.handledistributed, )
|
||||
session.broker.handlers.add(self.handledistributed)
|
||||
self.reset()
|
||||
|
||||
def reset(self):
|
||||
|
|
Loading…
Reference in a new issue