diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-10-22 19:44:59 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-10-22 19:47:17 +0200 |
commit | 0eb6e7ec4a1144dcca824d8add049787d3da1762 (patch) | |
tree | d653f5fe28bb247a3c4fadeca9bf6278d744f929 /module/plugins/PluginManager.py | |
parent | Spare code cosmetics (diff) | |
download | pyload-0eb6e7ec4a1144dcca824d8add049787d3da1762.tar.xz |
Two space before function declaration
Diffstat (limited to 'module/plugins/PluginManager.py')
-rw-r--r-- | module/plugins/PluginManager.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/module/plugins/PluginManager.py b/module/plugins/PluginManager.py index e263f8e04..034e40d4a 100644 --- a/module/plugins/PluginManager.py +++ b/module/plugins/PluginManager.py @@ -60,6 +60,7 @@ class PluginManager: self.log.debug("created index of plugins") + def parse(self, folder, pattern=False, home={}): """ returns dict with information @@ -211,12 +212,14 @@ class PluginManager: return res + def findPlugin(self, name, pluginlist=("hoster", "crypter", "container")): for ptype in pluginlist: if name in self.plugins[ptype]: return self.plugins[ptype][name], ptype return None, None + def getPlugin(self, name, original=False): """return plugin module from hoster|decrypter|container""" plugin, type = self.findPlugin(name) @@ -230,6 +233,7 @@ class PluginManager: return self.loadModule(type, name) + def getPluginName(self, name): """ used to obtain new name if other plugin was injected""" plugin, type = self.findPlugin(name) @@ -239,6 +243,7 @@ class PluginManager: return name + def loadModule(self, type, name): """ Returns loaded module for plugin @@ -258,15 +263,18 @@ class PluginManager: if self.core.debug: print_exc() + def loadClass(self, type, name): """Returns the class of a plugin with the same name""" module = self.loadModule(type, name) if module: return getattr(module, name) + def getAccountPlugins(self): """return list of account plugin names""" return self.accountPlugins.keys() + def find_module(self, fullname, path=None): #redirecting imports if necesarry if fullname.startswith(self.ROOT) or fullname.startswith(self.USERROOT): #seperate pyload plugins |