added timeout for ping in linux
This commit is contained in:
parent
6f8ccc4abe
commit
50003aa9cf
@ -65,7 +65,7 @@ class ZK_helper(object):
|
|||||||
import subprocess, platform
|
import subprocess, platform
|
||||||
|
|
||||||
# Ping parameters as function of OS
|
# Ping parameters as function of OS
|
||||||
ping_str = "-n 1" if platform.system().lower()=="windows" else "-c 1"
|
ping_str = "-n 1" if platform.system().lower()=="windows" else "-c 1 -W 5"
|
||||||
args = "ping " + " " + ping_str + " " + self.ip
|
args = "ping " + " " + ping_str + " " + self.ip
|
||||||
need_sh = False if platform.system().lower()=="windows" else True
|
need_sh = False if platform.system().lower()=="windows" else True
|
||||||
# Ping
|
# Ping
|
||||||
|
Loading…
Reference in New Issue
Block a user