diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-08-12 17:03:11 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-08-12 17:03:11 +0200 |
commit | fae28ebcc48455038cd1fcb6cfc99c7967b0c6c7 (patch) | |
tree | 73ac2ec93feec0b947611d94a91efa38d056b982 /module/PluginManager.py | |
parent | IRCHook fixes: getestet ! :D (diff) | |
download | pyload-fae28ebcc48455038cd1fcb6cfc99c7967b0c6c7.tar.xz |
XMPP Interface
Diffstat (limited to 'module/PluginManager.py')
-rw-r--r-- | module/PluginManager.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/module/PluginManager.py b/module/PluginManager.py index 44a426d31..f452e2b39 100644 --- a/module/PluginManager.py +++ b/module/PluginManager.py @@ -238,8 +238,16 @@ class PluginManager(): classes.append(value["class"]) continue - module = __import__(value["path"], globals(), locals(), [value["name"]] , -1) + if not self.core.config.getPlugin(name, "load"): + continue + try: + module = __import__(value["path"], globals(), locals(), [value["name"]] , -1) + except Exception, e: + self.log.error(_("Error importing %s: %s") % (name, str(e))) + self.log.error(_("You should fix dependicies or deactivate load on startup.")) + continue + pluginClass = getattr(module, name) value["class"] = pluginClass |