summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-05-07 20:25:50 +0200
committerGravatar mkaay <mkaay@mkaay.de> 2010-05-07 20:25:50 +0200
commit4f095b5000dbdcaa2327dac1bed4effa2ada0022 (patch)
treec581d8986023c82b38b224ce92c2c11932fa42f7
parentnew server method for premium accounts (diff)
downloadpyload-4f095b5000dbdcaa2327dac1bed4effa2ada0022.tar.xz
better plugin import
-rw-r--r--module/PluginManager.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/PluginManager.py b/module/PluginManager.py
index a91acefe3..ad01eba1b 100644
--- a/module/PluginManager.py
+++ b/module/PluginManager.py
@@ -68,9 +68,9 @@ class PluginManager():
continue
elif pluginName.endswith("_26") and not version_info[0:2] == (2, 6):
continue
- module = __import__(pluginModule, globals(), locals(), [pluginName], -1)
- pluginClass = getattr(module, pluginName)
try:
+ module = __import__(pluginModule, globals(), locals(), [pluginName], -1)
+ pluginClass = getattr(module, pluginName)
self.logger.debug(_("%(type)s: %(name)s added") % {"name":pluginName, "type":ptype})
if create:
pluginClass = pluginClass(self)