diff options
author | 2015-04-18 00:29:55 +0200 | |
---|---|---|
committer | 2015-04-18 00:29:55 +0200 | |
commit | bb5a115533711fd8bb87f53cb32ff7342137208d (patch) | |
tree | 476600f9896fae029880e4049eb4c5e6021b202d /pyload/database/User.py | |
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/database/User.py')
-rw-r--r-- | pyload/database/User.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pyload/database/User.py b/pyload/database/User.py index 374570fb7..e11961e32 100644 --- a/pyload/database/User.py +++ b/pyload/database/User.py @@ -30,7 +30,7 @@ class UserMethods(object): @style.queue def addUser(db, user, password): - salt = reduce(lambda x, y: x + y, [str(random.randint(0, 9)) for i in range(0, 5)]) + salt = reduce(lambda x, y: x + y, [str(random.randint(0, 9)) for _i in range(0, 5)]) h = sha1(salt + password) password = salt + h.hexdigest() @@ -53,7 +53,7 @@ class UserMethods(object): pw = r[2][5:] h = sha1(salt + oldpw) if h.hexdigest() == pw: - salt = reduce(lambda x, y: x + y, [str(random.randint(0, 9)) for i in range(0, 5)]) + salt = reduce(lambda x, y: x + y, [str(random.randint(0, 9)) for _i in range(0, 5)]) h = sha1(salt + newpw) password = salt + h.hexdigest() |