diff options
author | mathieui <mathieui@mathieui.net> | 2013-03-10 23:58:20 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2013-03-10 23:58:20 +0100 |
commit | eb2e5825bceec1171f0e154cb72f5870576a94f2 (patch) | |
tree | 8566d9b802f15a5419324a648c0fc1ba48f08e04 /src/plugin_manager.py | |
parent | f0fb3d5d7afbebc521de7ca971a96741b8bb1a9f (diff) | |
download | poezio-eb2e5825bceec1171f0e154cb72f5870576a94f2.tar.gz poezio-eb2e5825bceec1171f0e154cb72f5870576a94f2.tar.bz2 poezio-eb2e5825bceec1171f0e154cb72f5870576a94f2.tar.xz poezio-eb2e5825bceec1171f0e154cb72f5870576a94f2.zip |
Disable plugins on exit
Diffstat (limited to 'src/plugin_manager.py')
-rw-r--r-- | src/plugin_manager.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugin_manager.py b/src/plugin_manager.py index afd04330..693a90c6 100644 --- a/src/plugin_manager.py +++ b/src/plugin_manager.py @@ -67,6 +67,13 @@ class PluginManager(object): self.roster_elements = {} self.plugin_api = PluginAPI(core, self) + def disable_plugins(self): + for plugin in set(self.plugins.keys()): + try: + self.unload(plugin) + except: + pass + def load(self, name, notify=True): """ Load a plugin. |