diff options
Diffstat (limited to 'module/PluginThread.py')
-rw-r--r-- | module/PluginThread.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/module/PluginThread.py b/module/PluginThread.py index d29d609c7..aeb2ac2aa 100644 --- a/module/PluginThread.py +++ b/module/PluginThread.py @@ -454,8 +454,10 @@ class HookThread(PluginThread): def run(self): try: try: - self.f(*self.args, thread=self, **self.kwargs) + self.kwargs["thread"] = self + self.f(*self.args, **self.kwargs) except TypeError: + del self.kwargs["thread"] self.f(*self.args, **self.kwargs) finally: local = copy(self.active) |