Skip to content

Commit c38a840

Browse files
fix: ping stderr to devnull
1 parent 96f6e29 commit c38a840

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tcp_modbus_aio/ping.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
async def ping_ip(ip: str, timeout: float = 0.5) -> float | None:
66
"""Return the latency in seconds of a ping to the given ip, or None if the ping failed"""
77
ping_process = await asyncio.create_subprocess_shell(
8-
f"ping -c 1 {ip}", stdout=subprocess.PIPE
8+
f"ping -c 1 {ip}", stdout=subprocess.PIPE, stderr=subprocess.DEVNULL
99
)
1010

1111
try:

0 commit comments

Comments
 (0)