Skip to content

Commit

Permalink
删除linux遗留命令-c
Browse files Browse the repository at this point in the history
  • Loading branch information
olixu committed Jul 9, 2020
1 parent 3fe65b0 commit e0aed4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pingip.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e0aed4d

Please sign in to comment.