summaryrefslogtreecommitdiffstats
path: root/module/PluginManager.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-08-02 12:26:11 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-08-02 12:26:11 +0200
commitae0a6546752e95735cb8d4086127540619f44419 (patch)
tree1cc0ada2fb6ae8a54c25d392528c809d62f04641 /module/PluginManager.py
parentRapidshare, Netload, Uploaded updated. (diff)
downloadpyload-ae0a6546752e95735cb8d4086127540619f44419.tar.xz
reconnect fix
Diffstat (limited to 'module/PluginManager.py')
-rw-r--r--module/PluginManager.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/module/PluginManager.py b/module/PluginManager.py
index db746975a..bace9807d 100644
--- a/module/PluginManager.py
+++ b/module/PluginManager.py
@@ -205,22 +205,25 @@ class PluginManager():
"""return account class if existent"""
if self.accountPlugins.has_key(name):
plugin = self.accountPlugins[name]
- if plugin.has_key("inst"):
- return plugin["inst"]
+ if plugin.has_key("class"):
+ return plugin["class"]
module = __import__(plugin["path"], globals(), locals(), [plugin["name"]] , -1)
- pclass = getattr(module, plugin["name"])
- plugin["inst"] = pclass(self)
-
-
- return plugin["inst"]
+ plugin["class"] = getattr(module, plugin["name"])
+
+ return plugin["class"]
return None
#----------------------------------------------------------------------
def getAccountPlugins(self):
- """return list of account modules"""
+ """return list of account plugin names"""
+ res = []
+ for name in self.accountPlugins.keys():
+ res.append(name)
+
+ return res
#----------------------------------------------------------------------
def getHookPlugins(self):
"""return list of hook classes"""