.
This commit is contained in:
parent
a855cfe2f6
commit
03cb1839d9
@ -1,3 +1,4 @@
|
|||||||
packages:
|
packages:
|
||||||
- vim
|
- vim
|
||||||
- jq
|
- jq
|
||||||
|
- htop
|
||||||
|
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user