diff options
author | Calum Lind <calumlind+deluge@gmail.com> | 2014-09-03 22:28:28 +0100 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2014-09-03 23:48:34 +0100 |
commit | 5167e93d12cb9f3c43ab2cecdac3961dac6b0fb2 (patch) | |
tree | 92c4504c3943999836edeeaee2b52af3f04dd6c4 /deluge/ui/web | |
parent | 5d88504c34bab3d00c338ad7f5da7048beba9223 (diff) | |
download | deluge-5167e93d12cb9f3c43ab2cecdac3961dac6b0fb2.tar.gz deluge-5167e93d12cb9f3c43ab2cecdac3961dac6b0fb2.tar.bz2 deluge-5167e93d12cb9f3c43ab2cecdac3961dac6b0fb2.zip |
Flake8 core and common files
* Added N802 to flake8 ignore as certain inherited funcs cannot be changed
to lowercase and this unresolved warning hides other errors/warnings.
* Include new header
Diffstat (limited to 'deluge/ui/web')
-rw-r--r-- | deluge/ui/web/__init__.py | 1 | ||||
-rw-r--r-- | deluge/ui/web/auth.py | 6 | ||||
-rw-r--r-- | deluge/ui/web/json_api.py | 2 | ||||
-rw-r--r-- | deluge/ui/web/server.py | 2 |
4 files changed, 6 insertions, 5 deletions
diff --git a/deluge/ui/web/__init__.py b/deluge/ui/web/__init__.py index f70f6a9c8..763684964 100644 --- a/deluge/ui/web/__init__.py +++ b/deluge/ui/web/__init__.py @@ -1 +1,2 @@ from web import start +assert start # silence pyflakes diff --git a/deluge/ui/web/auth.py b/deluge/ui/web/auth.py index 3bf4e2b92..22dffd11a 100644 --- a/deluge/ui/web/auth.py +++ b/deluge/ui/web/auth.py @@ -42,7 +42,7 @@ class AuthError(Exception): def make_checksum(session_id): - return reduce(lambda x, y: x+y, map(ord, session_id)) + return reduce(lambda x, y: x + y, map(ord, session_id)) def get_session_id(session_id): @@ -118,7 +118,7 @@ class Auth(JSONComponent): checksum = str(make_checksum(session_id)) request.addCookie('_session_id', session_id + checksum, - path=request.base+"json", expires=expires_str) + path=request.base + "json", expires=expires_str) log.debug("Creating session for %s", login) config = component.get("DelugeWeb").config @@ -215,7 +215,7 @@ class Auth(JSONComponent): _session_id = request.getCookie("_session_id") request.addCookie('_session_id', _session_id, - path=request.base+"json", expires=expires_str) + path=request.base + "json", expires=expires_str) if method: if not hasattr(method, "_json_export"): diff --git a/deluge/ui/web/json_api.py b/deluge/ui/web/json_api.py index 9b435819b..c315a0691 100644 --- a/deluge/ui/web/json_api.py +++ b/deluge/ui/web/json_api.py @@ -757,7 +757,7 @@ class WebApi(JSONComponent): Return the hosts in the hostlist. """ log.debug("get_hosts called") - return [(tuple(host[HOSTS_ID:HOSTS_PORT+1]) + (_("Offline"),)) for host in self.host_list["hosts"]] + return [(tuple(host[HOSTS_ID:HOSTS_PORT + 1]) + (_("Offline"),)) for host in self.host_list["hosts"]] @export def get_host_status(self, host_id): diff --git a/deluge/ui/web/server.py b/deluge/ui/web/server.py index 6fd61630d..aa5fc2d08 100644 --- a/deluge/ui/web/server.py +++ b/deluge/ui/web/server.py @@ -354,7 +354,7 @@ class ScriptResource(resource.Resource, component.Component): except: pass - dirpath = dirpath[len(filepath)+1:] + dirpath = dirpath[len(filepath) + 1:] if dirpath: scripts.extend(['js/' + path + '/' + dirpath + '/' + f for f in files]) else: |