(self, plugin)
| 173 | start_new_thread(plugin.coreReady, tuple()) |
| 174 | |
| 175 | def deactivateHook(self, plugin): |
| 176 | |
| 177 | hook = None |
| 178 | for inst in self.plugins: |
| 179 | if inst.__name__ == plugin: |
| 180 | hook = inst |
| 181 | |
| 182 | if not hook: return |
| 183 | |
| 184 | self.log.debug("Plugin unloaded: %s" % plugin) |
| 185 | |
| 186 | hook.unload() |
| 187 | |
| 188 | #remove periodic call |
| 189 | self.log.debug("Removed callback %s" % self.core.scheduler.removeJob(hook.cb)) |
| 190 | self.plugins.remove(hook) |
| 191 | del self.pluginMap[hook.__name__] |
| 192 | |
| 193 | |
| 194 | @try_catch |
no test coverage detected