diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-04-10 13:37:02 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-06-28 02:51:58 +0200 |
commit | 2ff2fb0495febe11d5015d2308d67e1d8048e597 (patch) | |
tree | 2ae9d1da4a701fc6b3945ccc32dfbbf102b9c85a /module/ThreadManager.py | |
parent | Localization badge (diff) | |
download | pyload-2ff2fb0495febe11d5015d2308d67e1d8048e597.tar.xz |
Some code cosmetics about commas, spaces and quotes
Merges #577
Diffstat (limited to 'module/ThreadManager.py')
-rw-r--r-- | module/ThreadManager.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/module/ThreadManager.py b/module/ThreadManager.py index ec3e9efcf..b8662c514 100644 --- a/module/ThreadManager.py +++ b/module/ThreadManager.py @@ -262,8 +262,8 @@ 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 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) + 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 x.active.hasPlugin() and not x.active.plugin.multiDL] + onlimit @@ -310,7 +310,7 @@ class ThreadManager: thread = PluginThread.DecrypterThread(self, job) def getLimit(self, thread): - limit = thread.active.plugin.account.getAccountData(thread.active.plugin.user)["options"].get("limitDL",["0"])[0] + limit = thread.active.plugin.account.getAccountData(thread.active.plugin.user)["options"].get("limitDL", ["0"])[0] return int(limit) def cleanup(self): |