mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Fix ruff complaints in control4 (#116058)
This commit is contained in:
parent
8f1761343e
commit
0c583bb1d9
@ -52,8 +52,7 @@ async def call_c4_api_retry(func, *func_args):
|
|||||||
"""Call C4 API function and retry on failure."""
|
"""Call C4 API function and retry on failure."""
|
||||||
for i in range(API_RETRY_TIMES):
|
for i in range(API_RETRY_TIMES):
|
||||||
try:
|
try:
|
||||||
output = await func(*func_args)
|
return await func(*func_args)
|
||||||
return output
|
|
||||||
except client_exceptions.ClientError as exception:
|
except client_exceptions.ClientError as exception:
|
||||||
_LOGGER.error("Error connecting to Control4 account API: %s", exception)
|
_LOGGER.error("Error connecting to Control4 account API: %s", exception)
|
||||||
if i == API_RETRY_TIMES - 1:
|
if i == API_RETRY_TIMES - 1:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user