Use new format for logging exceptions - auth.py (#3177)

This commit is contained in:
Finn 2021-10-01 13:23:38 +02:00 committed by GitHub
parent 8240623806
commit d6127832a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,8 +64,7 @@ class Auth(FileConfiguration, CoreSysAttributes):
async def check_login(self, addon: Addon, username: str, password: str) -> bool:
"""Check username login."""
if password is None:
_LOGGER.error("None as password is not supported!")
raise AuthError()
raise AuthError("None as password is not supported!", _LOGGER.error)
_LOGGER.info("Auth request from '%s' for '%s'", addon.slug, username)
# Get from cache