opnsense-ports/audio/py-pyradio/files/patch-pyradio_ping.py
Franco Fichtner 57ae97c49c */*: sync with upstream
Taken from: FreeBSD
2022-11-28 08:27:50 +01:00

11 lines
530 B
Python

--- pyradio/ping.py.orig 2022-11-25 15:21:16 UTC
+++ pyradio/ping.py
@@ -35,7 +35,7 @@ def linux_ping(server, count=1, timeout_in_seconds=1):
-1: error
'''
try:
- r=subprocess.Popen(['ping', '-c', str(count), '-w', str(timeout_in_seconds), server ], stdout=subprocess.PIPE).stdout.read()
+ r=subprocess.Popen(['ping', '-c', str(count), '-t', str(timeout_in_seconds), server ], stdout=subprocess.PIPE).stdout.read()
# print(r)
return 0 if '100%' in str(r) else 1
except: