summaryrefslogtreecommitdiffstats
path: root/module/PluginThread.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-10-14 18:10:40 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-10-14 18:10:40 +0200
commite4077960822e24f3041e16e7e818c105e372152d (patch)
tree12580f141668f4eb0edf4b90fbf3417e8dcc3a3a /module/PluginThread.py
parentfixes syntax error on old python versions (diff)
downloadpyload-e4077960822e24f3041e16e7e818c105e372152d.tar.xz
first version of new extract plugin
Diffstat (limited to 'module/PluginThread.py')
-rw-r--r--module/PluginThread.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/module/PluginThread.py b/module/PluginThread.py
index aeb2ac2aa..37176574e 100644
--- a/module/PluginThread.py
+++ b/module/PluginThread.py
@@ -443,7 +443,8 @@ class HookThread(PluginThread):
def addActive(self, pyfile):
""" Adds a pyfile to active list and thus will be displayed on overview"""
- self.active.append(pyfile)
+ if pyfile not in self.active:
+ self.active.append(pyfile)
def finishFile(self, pyfile):
if pyfile in self.active:
@@ -456,7 +457,12 @@ class HookThread(PluginThread):
try:
self.kwargs["thread"] = self
self.f(*self.args, **self.kwargs)
- except TypeError:
+ except TypeError, e:
+ #dirty method to filter out exceptions
+ if "unexpected keyword argument 'thread'" not in e.message:
+ print_exc()
+ raise e
+
del self.kwargs["thread"]
self.f(*self.args, **self.kwargs)
finally: