summaryrefslogtreecommitdiffstats
path: root/deluge/ui/web/auth.py
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2015-10-22 23:14:14 +0100
committerCalum Lind <calumlind+deluge@gmail.com>2015-10-30 18:39:47 +0000
commit807fa609f9449f1f18b40ad98c350eca2211037a (patch)
treef88d68646cb20fd02f8809fbb2877d5717c69459 /deluge/ui/web/auth.py
parentad3cba929ee175a5990e617461bc3a638e557a97 (diff)
downloaddeluge-807fa609f9449f1f18b40ad98c350eca2211037a.tar.gz
deluge-807fa609f9449f1f18b40ad98c350eca2211037a.tar.bz2
deluge-807fa609f9449f1f18b40ad98c350eca2211037a.zip
[Lint] Cleanup code to pass PyLint Warning category
Selected Warning messages disabled in pylintrc: * unused-argument: Quite a large and disruptive change if enabled. * broad-except: Most required in-depth investigation to determine type. * fixme: Not important * protected-access: Complicated to fix * import-error: Too many false-positives * unidiomatic-typecheck: Should be fixed in the next round of checks. * unused-variable: Again large and disruptive changes. * global-statement: Most usage is required. * attribute-defined-outside-init: Should be fixed in next round of checks. * arguments-differ: Possible false-positives, needs revisited. * no-init, non-parent-init-called, super-init-not-called: False-positives? * signature-differs: False-positives?
Diffstat (limited to 'deluge/ui/web/auth.py')
-rw-r--r--deluge/ui/web/auth.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/deluge/ui/web/auth.py b/deluge/ui/web/auth.py
index 55325542d..96b61a822 100644
--- a/deluge/ui/web/auth.py
+++ b/deluge/ui/web/auth.py
@@ -13,7 +13,6 @@ import random
import time
from datetime import datetime, timedelta
from email.utils import formatdate
-from functools import reduce
from twisted.internet.task import LoopingCall
@@ -43,7 +42,10 @@ from deluge.ui.web.json_api import export, JSONComponent # NOQA, isort:skip
def make_checksum(session_id):
- return reduce(lambda x, y: x + y, map(ord, session_id))
+ checksum = 0
+ for value in [ord(char) for char in session_id]:
+ checksum += value
+ return checksum
def get_session_id(session_id):