Loading ccnode/node.py +4 −4 Original line number Diff line number Diff line Loading @@ -138,19 +138,17 @@ class RPCStartHandler(Thread): # close previous plugins if needed if self.loop.role is not None: self.loop.close_plugins() # re-register the tags of the main loop self.loop.tag_db.register() logger.debug('Role host affected') from ccnode.host import Handler as HostHandler self.loop.main_plugin = HostHandler(loop=self.loop) self.loop.role = u'host' # (re)-register the tags of the main loop self.loop.tag_db.rpc_register() self.loop.register_plugin(self.loop.main_plugin) elif response == u'hv': # close previous plugins if needed if self.loop.role is not None: self.loop.close_plugins() # re-register the tags of the main loop self.loop.tag_db.register() logger.debug('Role hypervisor affected') # we don't import those modules at the top because some dependancies # may not be installed Loading @@ -160,6 +158,8 @@ class RPCStartHandler(Thread): loop=self.loop, ) self.loop.role = u'hv' # (re)-register the tags of the main loop self.loop.tag_db.rpc_register() self.loop.register_plugin(self.loop.main_plugin) else: logger.error('Failed authentication, role returned: %s', response) Loading Loading
ccnode/node.py +4 −4 Original line number Diff line number Diff line Loading @@ -138,19 +138,17 @@ class RPCStartHandler(Thread): # close previous plugins if needed if self.loop.role is not None: self.loop.close_plugins() # re-register the tags of the main loop self.loop.tag_db.register() logger.debug('Role host affected') from ccnode.host import Handler as HostHandler self.loop.main_plugin = HostHandler(loop=self.loop) self.loop.role = u'host' # (re)-register the tags of the main loop self.loop.tag_db.rpc_register() self.loop.register_plugin(self.loop.main_plugin) elif response == u'hv': # close previous plugins if needed if self.loop.role is not None: self.loop.close_plugins() # re-register the tags of the main loop self.loop.tag_db.register() logger.debug('Role hypervisor affected') # we don't import those modules at the top because some dependancies # may not be installed Loading @@ -160,6 +158,8 @@ class RPCStartHandler(Thread): loop=self.loop, ) self.loop.role = u'hv' # (re)-register the tags of the main loop self.loop.tag_db.rpc_register() self.loop.register_plugin(self.loop.main_plugin) else: logger.error('Failed authentication, role returned: %s', response) Loading