This commit is contained in:
jonas 2021-11-10 18:14:25 +01:00
parent a855cfe2f6
commit 03cb1839d9
2 changed files with 2 additions and 1 deletions

View File

@ -1,3 +1,4 @@
packages: packages:
- vim - vim
- jq - jq
- htop

View File

@ -33,7 +33,7 @@ def stop_vm(name, ns):
_exec(cmd) _exec(cmd)
def ping(host): def ping(host):
cmd = f"ping -c 1 {host}".split() cmd = f"ping -c 1 -W 1 {host}".split()
process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = process.communicate() stdout, stderr = process.communicate()
if process.returncode == 0: if process.returncode == 0: