Use asyncio.timeout [o-s] (#98451)

This commit is contained in:
Marc Mueller 2023-08-15 17:21:49 +02:00 committed by GitHub
parent 496a975c58
commit 063ce9159d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
41 changed files with 70 additions and 92 deletions

View file

@ -8,7 +8,6 @@ import logging
import re
from typing import TYPE_CHECKING, Any
import async_timeout
from icmplib import NameLookupError, async_ping
import voluptuous as vol
@ -218,7 +217,7 @@ class PingDataSubProcess(PingData):
close_fds=False, # required for posix_spawn
)
try:
async with async_timeout.timeout(self._count + PING_TIMEOUT):
async with asyncio.timeout(self._count + PING_TIMEOUT):
out_data, out_error = await pinger.communicate()
if out_data: