Further reduce user_ops line length in preparation for monaco

This commit is contained in:
Kristóf Tóth 2018-06-13 09:38:56 +02:00
parent 321699c644
commit 5180edbaf6
1 changed files with 8 additions and 2 deletions

View File

@ -13,7 +13,10 @@ class UserOps:
self.password = password
self.db_session = db_session
self.message_sender = MessageSender()
self.log = partial(self.message_sender.send, 'Authenticator')
self.log = partial(
self.message_sender.send,
'Authenticator'
)
def authenticate(self):
"""
@ -31,7 +34,10 @@ class UserOps:
self.password,
user.passwordhash
):
self.log(f'Invalid credentials for user "{self.username}"!')
self.log(
f'Invalid credentials for '
f'user "{self.username}"!'
)
raise InvalidCredentialsError
self.log(f'User "{self.username}" logged in!')