mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Fix ping TypeError when killing the process (#157794)
This commit is contained in:
@@ -162,7 +162,7 @@ class PingDataSubProcess(PingData):
|
||||
|
||||
if pinger:
|
||||
with suppress(TypeError, ProcessLookupError):
|
||||
await pinger.kill() # type: ignore[func-returns-value]
|
||||
pinger.kill()
|
||||
del pinger
|
||||
|
||||
return None
|
||||
|
||||
@@ -22,7 +22,7 @@ class MockAsyncSubprocess:
|
||||
"""Fails immediately with a timeout."""
|
||||
raise TimeoutError
|
||||
|
||||
async def kill(self) -> None:
|
||||
def kill(self) -> None:
|
||||
"""Raise preset exception when called."""
|
||||
raise self.killsig
|
||||
|
||||
|
||||
Reference in New Issue
Block a user