From b5156d437bfcc318d7728c9bd8c6c728e0b954ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Wed, 6 Jun 2018 20:42:05 +0200 Subject: [PATCH] Fix webservice authentication bug caused by pylint streak --- solvable/src/webservice/user_ops.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/solvable/src/webservice/user_ops.py b/solvable/src/webservice/user_ops.py index c9107a6..f40087d 100644 --- a/solvable/src/webservice/user_ops.py +++ b/solvable/src/webservice/user_ops.py @@ -27,12 +27,10 @@ class UserOps: User.username == self.username ).first() - passw_is_correct = PasswordHasher.verify( - self.password, - user.passwordhash - ) - - if not user or not passw_is_correct: + if not user or not PasswordHasher.verify( + self.password, + user.passwordhash + ): self.log(f'Invalid credentials for user "{self.username}"!') raise InvalidCredentialsError