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:
1 parent
e0d3a2a873
commit
50dd7de226
1 file changed
+1
-1
@@ -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