From bb5a115533711fd8bb87f53cb32ff7342137208d Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 18 Apr 2015 00:29:55 +0200 Subject: Spare code cosmetics (5) --- pyload/manager/Account.py | 9 ++++++--- pyload/manager/Addon.py | 2 -- pyload/manager/Plugin.py | 3 ++- pyload/manager/Remote.py | 1 + pyload/manager/Thread.py | 6 ++++-- 5 files changed, 13 insertions(+), 8 deletions(-) (limited to 'pyload/manager') diff --git a/pyload/manager/Account.py b/pyload/manager/Account.py index 4e4a82aed..44a5e5c65 100644 --- a/pyload/manager/Account.py +++ b/pyload/manager/Account.py @@ -90,9 +90,12 @@ class AccountManager(object): for line in content[1:]: line = line.strip() - if not line: continue - if line.startswith("#"): continue - if line.startswith("version"): continue + if not line: + continue + if line.startswith("#"): + continue + if line.startswith("version"): + continue if line.endswith(":") and line.count(":") == 1: plugin = line[:-1] diff --git a/pyload/manager/Addon.py b/pyload/manager/Addon.py index cf23715b6..5ac56a349 100644 --- a/pyload/manager/Addon.py +++ b/pyload/manager/Addon.py @@ -41,8 +41,6 @@ class AddonManager(object): | Notes: | all_downloads-processed is *always* called before all_downloads-finished. | config-changed is *always* called before pluginConfigChanged. - - """ def __init__(self, core): diff --git a/pyload/manager/Plugin.py b/pyload/manager/Plugin.py index e99b1cea6..905ce524e 100644 --- a/pyload/manager/Plugin.py +++ b/pyload/manager/Plugin.py @@ -313,7 +313,8 @@ class PluginManager(object): else: user = 0 # used as bool and int split = fullname.split(".") - if len(split) != 4 - user: return + if len(split) != 4 - user: + return type, name = split[2 - user:4 - user] if type in self.plugins and name in self.plugins[type]: diff --git a/pyload/manager/Remote.py b/pyload/manager/Remote.py index b18035a00..c2d254932 100644 --- a/pyload/manager/Remote.py +++ b/pyload/manager/Remote.py @@ -61,6 +61,7 @@ class RemoteManager(object): # else: # self.available.append("SocketBackend") + def startBackends(self): host = self.core.config.get("remote", "listenaddr") port = self.core.config.get("remote", "port") diff --git a/pyload/manager/Thread.py b/pyload/manager/Thread.py index b255523d6..a8550e504 100644 --- a/pyload/manager/Thread.py +++ b/pyload/manager/Thread.py @@ -250,10 +250,12 @@ class ThreadManager(object): def assignJob(self): """assing a job to a thread if possible""" - if self.pause or not self.core.api.isTimeDownload(): return + if self.pause or not self.core.api.isTimeDownload(): + return # if self.downloaded > 20: - # if not self.cleanPyCurl(): return + # if not self.cleanPyCurl(): + return free = [x for x in self.threads if not x.active] -- cgit v1.2.3