MCPcopy
hub / github.com/pyload/pyload / __init__

Method __init__

module/HookManager.py:64–83  ·  view source on GitHub ↗
(self, core)

Source from the content-addressed store, hash-verified

62 """
63
64 def __init__(self, core):
65 self.core = core
66 self.config = self.core.config
67
68 __builtin__.hookManager = self #needed to let hooks register themself
69
70 self.log = self.core.log
71 self.plugins = []
72 self.pluginMap = {}
73 self.methods = {} #dict of names and list of methods usable by rpc
74
75 self.events = {} # contains events
76
77 #registering callback for config event
78 self.config.pluginCB = MethodType(self.dispatchEvent, "pluginConfigChanged", basestring)
79
80 self.addEvent("pluginConfigChanged", self.manageHooks)
81
82 self.lock = RLock()
83 self.createIndex()
84
85 def try_catch(func):
86 def new(*args):

Callers

nothing calls this directly

Calls 2

addEventMethod · 0.95
createIndexMethod · 0.95

Tested by

no test coverage detected