diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-18 00:29:55 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-18 00:29:55 +0200 |
commit | bb5a115533711fd8bb87f53cb32ff7342137208d (patch) | |
tree | 476600f9896fae029880e4049eb4c5e6021b202d /pyload/manager | |
parent | PEP-8, Python Zen, refactor and reduce code (part 6 in master module/common) (diff) | |
download | pyload-bb5a115533711fd8bb87f53cb32ff7342137208d.tar.xz |
Spare code cosmetics (5)
Diffstat (limited to 'pyload/manager')
-rw-r--r-- | pyload/manager/Account.py | 9 | ||||
-rw-r--r-- | pyload/manager/Addon.py | 2 | ||||
-rw-r--r-- | pyload/manager/Plugin.py | 3 | ||||
-rw-r--r-- | pyload/manager/Remote.py | 1 | ||||
-rw-r--r-- | pyload/manager/Thread.py | 6 |
5 files changed, 13 insertions, 8 deletions
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] |