diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-10-13 15:42:44 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-10-13 15:42:44 +0200 |
commit | efdd172e823cfc59d33c7acf30510cf05c2791fb (patch) | |
tree | b977a715a9562e2288bf933921c28c20c94df347 /module/PluginThread.py | |
parent | improvement for hook plugins, new internal plugin type (diff) | |
download | pyload-efdd172e823cfc59d33c7acf30510cf05c2791fb.tar.xz |
fixes syntax error on old python versions
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) |