MCPcopy
hub / github.com/pyload/pyload / getPlugin

Method getPlugin

module/plugins/PluginManager.py:268–279  ·  view source on GitHub ↗

return plugin module from hoster|decrypter|container

(self, name, original=False)

Source from the content-addressed store, hash-verified

266 return None, None
267
268 def getPlugin(self, name, original=False):
269 """return plugin module from hoster|decrypter|container"""
270 plugin, type = self.findPlugin(name)
271
272 if not plugin:
273 self.log.warning("Plugin %s not found." % name)
274 plugin = self.hosterPlugins["BasePlugin"]
275
276 if "new_module" in plugin and not original:
277 return plugin["new_module"]
278
279 return self.loadModule(type, name)
280
281 def getPluginName(self, name):
282 """ used to obtain new name if other plugin was injected"""

Callers 2

getConfMethod · 0.45
getMethod · 0.45

Calls 2

findPluginMethod · 0.95
loadModuleMethod · 0.95

Tested by

no test coverage detected