Fix ruff complaints in control4 (#116058)

This commit is contained in:
J. Nick Koston 2024-04-23 22:25:35 +02:00 committed by GitHub
parent 8f1761343e
commit 0c583bb1d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -52,8 +52,7 @@ async def call_c4_api_retry(func, *func_args):
"""Call C4 API function and retry on failure."""
for i in range(API_RETRY_TIMES):
try:
output = await func(*func_args)
return output
return await func(*func_args)
except client_exceptions.ClientError as exception:
_LOGGER.error("Error connecting to Control4 account API: %s", exception)
if i == API_RETRY_TIMES - 1: