Skip to content

Commit be197a1

Browse files
committed
fix use of asyncio_timeout
1 parent 9d14f8f commit be197a1

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

universal_silabs_flasher/flasher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ async def enter_bootloader(self) -> None:
284284
await spinel.enter_bootloader()
285285
elif self.app_type is ApplicationType.ROUTER:
286286
async with self._connect_router(self.app_baudrate) as router:
287-
async with async_timeout.timeout(PROBE_TIMEOUT):
287+
async with asyncio_timeout(PROBE_TIMEOUT):
288288
await router.enter_bootloader()
289289
elif self.app_type is ApplicationType.EZSP:
290290
async with self._connect_ezsp(self.app_baudrate) as ezsp:

universal_silabs_flasher/router.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
import logging
66
import re
77

8-
import async_timeout
98
from zigpy.serial import SerialProtocol
109

11-
from .common import PROBE_TIMEOUT, StateMachine, Version
10+
from .common import PROBE_TIMEOUT, StateMachine, Version, asyncio_timeout
1211

1312
_LOGGER = logging.getLogger(__name__)
1413

@@ -38,7 +37,7 @@ def __init__(self) -> None:
3837

3938
async def probe(self) -> Version:
4039
"""Attempt to communicate with the router."""
41-
async with async_timeout.timeout(PROBE_TIMEOUT):
40+
async with asyncio_timeout(PROBE_TIMEOUT):
4241
return await self.router_info()
4342

4443
async def router_info(self) -> Version:

0 commit comments

Comments
 (0)