Skip to content

Commit

Permalink
fix: ping stderr to devnull
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuagruenstein committed Apr 25, 2024
1 parent 96f6e29 commit c38a840
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tcp_modbus_aio/ping.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
async def ping_ip(ip: str, timeout: float = 0.5) -> float | None:
"""Return the latency in seconds of a ping to the given ip, or None if the ping failed"""
ping_process = await asyncio.create_subprocess_shell(
f"ping -c 1 {ip}", stdout=subprocess.PIPE
f"ping -c 1 {ip}", stdout=subprocess.PIPE, stderr=subprocess.DEVNULL
)

try:
Expand Down

0 comments on commit c38a840

Please sign in to comment.