diff --git a/universal_silabs_flasher/flasher.py b/universal_silabs_flasher/flasher.py index 1cca451..b3e7e2d 100644 --- a/universal_silabs_flasher/flasher.py +++ b/universal_silabs_flasher/flasher.py @@ -284,7 +284,7 @@ async def enter_bootloader(self) -> None: await spinel.enter_bootloader() elif self.app_type is ApplicationType.ROUTER: async with self._connect_router(self.app_baudrate) as router: - async with async_timeout.timeout(PROBE_TIMEOUT): + async with asyncio_timeout(PROBE_TIMEOUT): await router.enter_bootloader() elif self.app_type is ApplicationType.EZSP: async with self._connect_ezsp(self.app_baudrate) as ezsp: diff --git a/universal_silabs_flasher/router.py b/universal_silabs_flasher/router.py index 3686a74..38edfd1 100644 --- a/universal_silabs_flasher/router.py +++ b/universal_silabs_flasher/router.py @@ -5,10 +5,9 @@ import logging import re -import async_timeout from zigpy.serial import SerialProtocol -from .common import PROBE_TIMEOUT, StateMachine, Version +from .common import PROBE_TIMEOUT, StateMachine, Version, asyncio_timeout _LOGGER = logging.getLogger(__name__) @@ -38,7 +37,7 @@ def __init__(self) -> None: async def probe(self) -> Version: """Attempt to communicate with the router.""" - async with async_timeout.timeout(PROBE_TIMEOUT): + async with asyncio_timeout(PROBE_TIMEOUT): return await self.router_info() async def router_info(self) -> Version: