summaryrefslogtreecommitdiff
path: root/src/plugin_manager.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2013-03-10 23:58:20 +0100
committermathieui <mathieui@mathieui.net>2013-03-10 23:58:20 +0100
commiteb2e5825bceec1171f0e154cb72f5870576a94f2 (patch)
tree8566d9b802f15a5419324a648c0fc1ba48f08e04 /src/plugin_manager.py
parentf0fb3d5d7afbebc521de7ca971a96741b8bb1a9f (diff)
downloadpoezio-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.py7
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.