Use asyncio.timeout [o-s] (#98451)
This commit is contained in:
parent
496a975c58
commit
063ce9159d
41 changed files with 70 additions and 92 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue