Fix async_timeout deprecation warning (#94594)

* Fix async_timeout deprecation warning

* Combine async with
This commit is contained in:
Michael Hansen 2023-06-14 14:26:24 -05:00 committed by GitHub
parent 7fbeac9bbe
commit 5c3ec8774d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,8 +53,9 @@ async def load_wyoming_info(
for _ in range(retries + 1):
try:
async with AsyncTcpClient(host, port) as client:
with async_timeout.timeout(timeout):
async with AsyncTcpClient(host, port) as client, async_timeout.timeout(
timeout
):
# Describe -> Info
await client.write_event(Describe().event())
while True: