From e0aed4d1aeaa650a025ed54a66a36986f941a29e Mon Sep 17 00:00:00 2001 From: Oliver Xu <273601727@qq.com> Date: Thu, 9 Jul 2020 09:11:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4linux=E9=81=97=E7=95=99?= =?UTF-8?q?=E5=91=BD=E4=BB=A4-c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pingip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pingip.py b/pingip.py index 6d966a4..f9dc863 100644 --- a/pingip.py +++ b/pingip.py @@ -36,7 +36,7 @@ def get_all_ips(hosts_list_path): #多线程调用ping def ping_host(ip): global finish - popen = subprocess.Popen('ping -c 1 -w 1 %s' %ip, stdout=subprocess.PIPE,shell=True) + popen = subprocess.Popen('ping -w 1 %s' %ip, stdout=subprocess.PIPE,shell=True) popen.wait() res = popen.stdout.read().decode('gbk').strip('\n') if "平均" in res: