Address late review in SFRBox (#86604)

pull/86615/head
epenet 2023-01-25 10:46:45 +01:00 committed by GitHub
parent 781a4267cf
commit 5a77a2801b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -79,10 +79,10 @@ class SFRBoxFlowHandler(ConfigFlow, domain=DOMAIN):
errors = {}
if user_input is not None:
try:
if (username := user_input[CONF_USERNAME]) and (
password := user_input[CONF_PASSWORD]
):
await self._box.authenticate(username=username, password=password)
await self._box.authenticate(
username=user_input[CONF_USERNAME],
password=user_input[CONF_PASSWORD],
)
except SFRBoxAuthenticationError:
errors["base"] = "invalid_auth"
else: