Skip to content

Commit 1bf2b0d

Browse files
committed
Log warnings for ping command failures
1 parent af1f460 commit 1bf2b0d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ping/ping/ping_task.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import hyperdiv as hd
12
import time
23
import subprocess
34
from .state import PingState
@@ -23,7 +24,8 @@ def ping_task():
2324
for host in ping_values:
2425
try:
2526
ping_value = ping(host)
26-
except Exception:
27+
except Exception as e:
28+
hd.logger.warn(f"Ping Failed for {host}: {e}")
2729
ping_value = None
2830
ping_values[host] = ping_values[host][-20:] + ((now, ping_value),)
2931

0 commit comments

Comments
 (0)