Use asyncio.timeout [i-n] (#98450)
This commit is contained in:
parent
35b914af97
commit
71d985e4d6
49 changed files with 78 additions and 111 deletions
|
@ -4,8 +4,6 @@ import asyncio
|
|||
from contextlib import suppress
|
||||
import logging
|
||||
|
||||
from async_timeout import timeout
|
||||
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.helpers import config_entry_flow
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||
|
@ -28,7 +26,7 @@ async def _async_has_devices(hass: HomeAssistant) -> bool:
|
|||
disco = await async_start_discovery_service(hass)
|
||||
|
||||
with suppress(asyncio.TimeoutError):
|
||||
async with timeout(TIMEOUT_DISCOVERY):
|
||||
async with asyncio.timeout(TIMEOUT_DISCOVERY):
|
||||
await controller_ready.wait()
|
||||
|
||||
if not disco.pi_disco.controllers:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue