Use asyncio.timeout [s-z] (#98452)
This commit is contained in:
parent
71d985e4d6
commit
8b0fdd6fd2
38 changed files with 62 additions and 97 deletions
|
@ -4,7 +4,6 @@ from contextlib import suppress
|
|||
import logging
|
||||
from urllib.parse import urlparse
|
||||
|
||||
import async_timeout
|
||||
import upb_lib
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -45,7 +44,7 @@ async def _validate_input(data):
|
|||
upb.connect(_connected_callback)
|
||||
|
||||
with suppress(asyncio.TimeoutError):
|
||||
async with async_timeout.timeout(VALIDATE_TIMEOUT):
|
||||
async with asyncio.timeout(VALIDATE_TIMEOUT):
|
||||
await connected_event.wait()
|
||||
|
||||
upb.disconnect()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue