summaryrefslogtreecommitdiffstats
path: root/module/PluginManager.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/PluginManager.py')
-rw-r--r--module/PluginManager.py10
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