summaryrefslogtreecommitdiffstats
path: root/module/ThreadManager.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-06-18 14:37:00 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-06-18 14:37:00 +0200
commit40fc4979e4ca1f2a74972f68a88212b16cc26458 (patch)
tree9d1900929441be5d88f2c8a4602c5249d64f9a51 /module/ThreadManager.py
parentfixes setup unicode errors (diff)
downloadpyload-40fc4979e4ca1f2a74972f68a88212b16cc26458.tar.xz
some more locks
Diffstat (limited to 'module/ThreadManager.py')
-rw-r--r--module/ThreadManager.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/ThreadManager.py b/module/ThreadManager.py
index deefe125e..adf17ee8c 100644
--- a/module/ThreadManager.py
+++ b/module/ThreadManager.py
@@ -216,11 +216,11 @@ class ThreadManager:
free = [x for x in self.threads if not x.active]
- inuse = set([(x.active.pluginname,self.getLimit(x)) for x in self.threads if x.active and hasattr(x.active, "plugin") and x.active.plugin.account])
+ inuse = set([(x.active.pluginname,self.getLimit(x)) for x in self.threads if x.active and x.active.hasPlugin() and x.active.plugin.account])
inuse = map(lambda x : (x[0], x[1], len([y for y in self.threads if y.active and y.active.pluginname == x[0]])) ,inuse)
onlimit = [x[0] for x in inuse if x[1] > 0 and x[2] >= x[1]]
- occ = [x.active.pluginname for x in self.threads if x.active and not x.active.plugin.multiDL] + onlimit
+ occ = [x.active.pluginname for x in self.threads if x.active and x.active.hasPlugin() and not x.active.plugin.multiDL] + onlimit
occ.sort()
occ = tuple(set(occ))