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:
Tobias Brunner
2015-08-03 12:54:09 +02:00
parent e0d3a2a873
commit 50dd7de226
+1 -1
View File
@@ -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
}