From d5898965993b63ee719df48cca5d48b0a0402f85 Mon Sep 17 00:00:00 2001 From: mathieui Date: Sun, 2 Oct 2011 13:21:51 +0200 Subject: Adds a way to delete the commands without reloading the plugin --- src/plugin_manager.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/plugin_manager.py') diff --git a/src/plugin_manager.py b/src/plugin_manager.py index 82be8632..5bd6d75b 100644 --- a/src/plugin_manager.py +++ b/src/plugin_manager.py @@ -81,6 +81,12 @@ class PluginManager(object): import traceback self.core.information(_("Could not unload plugin (may not be safe to try again): ") + traceback.format_exc()) + def del_command(self, module_name, name): + if name in self.commands[module_name]: + del self.commands[module_name][name] + if name in self.core.commands: + del self.core.commands[name] + def add_command(self, module_name, name, handler, help, completion=None): if name in self.core.commands: raise Exception(_("Command '%s' already exists") % (name,)) -- cgit v1.2.3