Add messages on plugin load/unload
This commit is contained in:
parent
b43a2ff4a2
commit
e467020e29
1 changed files with 2 additions and 0 deletions
|
@ -61,6 +61,7 @@ class PluginManager(object):
|
||||||
self.commands[name] = {}
|
self.commands[name] = {}
|
||||||
self.event_handlers[name] = []
|
self.event_handlers[name] = []
|
||||||
self.plugins[name] = module.Plugin(self, self.core, plugins_conf_dir)
|
self.plugins[name] = module.Plugin(self, self.core, plugins_conf_dir)
|
||||||
|
self.core.information('Plugin %s loaded' % name, 'Info')
|
||||||
|
|
||||||
def unload(self, name):
|
def unload(self, name):
|
||||||
if name in self.plugins:
|
if name in self.plugins:
|
||||||
|
@ -74,6 +75,7 @@ class PluginManager(object):
|
||||||
del self.plugins[name]
|
del self.plugins[name]
|
||||||
del self.commands[name]
|
del self.commands[name]
|
||||||
del self.event_handlers[name]
|
del self.event_handlers[name]
|
||||||
|
self.core.information('Plugin %s unloaded' % name, 'Info')
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
import traceback
|
import traceback
|
||||||
self.core.information(_("Could not unload plugin (may not be safe to try again): ") + traceback.format_exc())
|
self.core.information(_("Could not unload plugin (may not be safe to try again): ") + traceback.format_exc())
|
||||||
|
|
Loading…
Reference in a new issue