Commit 3f4489d2 authored by Anael Beutot's avatar Anael Beutot
Browse files

Can register/deregister RPC handlers on the MainLoop imperatively.

parent 21924d76
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -243,6 +243,12 @@ class MainLoop(object):
        for tag in self.tag_db.pop(sub_id, {}).itervalues():
            tag.stop()

    def reset_handler(self, name, handl):
        self.rpc_handler[name] = handl

    def remove_handler(self, name):
        self.rpc_handler.pop(name, None)

    def register_plugin(self, plugin):
        # keep track of registered plugins
        if plugin in self.registered_plugins: