some cosmetics

This commit is contained in:
Valentin Samir
2015-05-27 22:18:01 +02:00
parent 1fcb0a7110
commit 9a4c6b9d7a
4 changed files with 7 additions and 4 deletions

View File

@ -80,7 +80,10 @@ class MysqlAuthUser(DummyAuthUser):
salt = '$'.join(self.user["password"].split('$', 3)[:-1])
return crypt.crypt(password, salt) == self.user["password"]
else:
return crypt.crypt(password, self.user["password"][:2]) == self.user["password"]
return crypt.crypt(
password,
self.user["password"][:2]
) == self.user["password"]
def attributs(self):
"""return a dict of user attributes"""