def unload(self): """ unregister all signals and commands used by this plugin """ for (signal, hlist) in self.__signals: for handler in hlist: signals.disconnect_signal(signal, handler) for (command, handler) in self.__commands: commands.remove_command(command, handler)
def remove_command(self, command): if commands.remove_command(command): del self.__commands[commands] return True return False