Skip to content

Commit db27aee

Browse files
cdce8pfrenck
authored andcommitted
Fix ping TypeError when killing the process (home-assistant#157794)
1 parent a7446b3 commit db27aee

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

homeassistant/components/ping/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ async def async_ping(self) -> dict[str, Any] | None:
162162

163163
if pinger:
164164
with suppress(TypeError, ProcessLookupError):
165-
await pinger.kill() # type: ignore[func-returns-value]
165+
pinger.kill()
166166
del pinger
167167

168168
return None

tests/components/ping/test_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ async def communicate(self) -> None:
2222
"""Fails immediately with a timeout."""
2323
raise TimeoutError
2424

25-
async def kill(self) -> None:
25+
def kill(self) -> None:
2626
"""Raise preset exception when called."""
2727
raise self.killsig
2828

0 commit comments

Comments
 (0)