From 0d77eac8e411b2467df343a6dd6e0fa932d80864 Mon Sep 17 00:00:00 2001
From: RaNaN <Mast3rRaNaN@hotmail.de>
Date: Fri, 20 Jan 2012 09:52:57 +0100
Subject: little threadmanager fix

---
 module/threads/ThreadManager.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'module')

diff --git a/module/threads/ThreadManager.py b/module/threads/ThreadManager.py
index a42d6df16..f8b5c0aba 100644
--- a/module/threads/ThreadManager.py
+++ b/module/threads/ThreadManager.py
@@ -264,9 +264,9 @@ class ThreadManager:
 
         free = [x for x in self.threads if not x.active]
 
-        inuse = uniqify([(x.active.pluginname, x.active.plugin.getDownloadLimit()) for x in self.threads if x.active and x.active.hasPlugin()])
-        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)
-        occ = tuple(sorted([x[0] for x in inuse if 0 < x[1] <= x[2]]))
+        inuse = [(x.active.pluginname, x.active.plugin.getDownloadLimit()) for x in self.threads if x.active and x.active.hasPlugin()]
+        inuse = [(x[0], x[1], len([y for y in self.threads if y.active and y.active.pluginname == x[0]])) for x in inuse]
+        occ = tuple(sorted(uniqify([x[0] for x in inuse if 0 < x[1] <= x[2]])))
         
         job = self.core.files.getJob(occ)
         if job:
-- 
cgit v1.2.3