testing: Suppress errors when checking for running hosts
If libvirt is not running virsh can't connect to it and will complain that the socket does not exist.
This commit is contained in:
@@ -163,7 +163,7 @@ running_any()
|
||||
command -v virsh >/dev/null || return 1
|
||||
for host in $*
|
||||
do
|
||||
virsh list --name | grep "^$host$" >/dev/null && return 0
|
||||
virsh list --name 2>/dev/null | grep "^$host$" >/dev/null && return 0
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user