Skip to content

Commit

Permalink
Fix async_call_with_retry arg error (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
amosyuen committed Feb 2, 2023
1 parent b560661 commit 0415573
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions custom_components/tplink_deco/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ def snake_case_to_title_space(str):
return " ".join([w.title() for w in str.split("_")])


async def async_call_with_retry(api, func, args):
if args is None:
args = []
async def async_call_with_retry(api, func, *args):
try:
return await func(*args)
except ConfigEntryAuthFailed:
Expand Down Expand Up @@ -247,7 +245,7 @@ async def _async_update_data(self):
# Send list client requests in parallel for each deco
deco_client_responses = await asyncio.gather(
*[
async_call_with_retry(self.api, self.api.async_list_clients, [deco_mac])
async_call_with_retry(self.api, self.api.async_list_clients, deco_mac)
for deco_mac in deco_macs
]
)
Expand Down

0 comments on commit 0415573

Please sign in to comment.