Use builtin TimeoutError [a-d] (#109678)
This commit is contained in:
parent
41a256a3ff
commit
c82933175d
63 changed files with 97 additions and 137 deletions
|
@ -1,7 +1,6 @@
|
|||
"""Config flow for Rollease Acmeda Automate Pulse Hub."""
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
from asyncio import timeout
|
||||
from contextlib import suppress
|
||||
from typing import Any
|
||||
|
@ -42,7 +41,7 @@ class AcmedaFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
|||
}
|
||||
|
||||
hubs: list[aiopulse.Hub] = []
|
||||
with suppress(asyncio.TimeoutError):
|
||||
with suppress(TimeoutError):
|
||||
async with timeout(5):
|
||||
async for hub in aiopulse.Hub.discover():
|
||||
if hub.id not in already_configured:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue