summaryrefslogtreecommitdiffstats
path: root/virt-top
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2007-09-20 15:13:33 +0100
committerRichard W.M. Jones <rjones@redhat.com>2007-09-20 15:13:33 +0100
commit4a3610a5813163d322b304d56b41bb68dbe83513 (patch)
tree118a96179cd0f376e84d40aeb1eac5cfe9768f79 /virt-top
parent83d02ef50a87d1c62147aaf7c2b9ab688d093f16 (diff)
downloadvirt-top-4a3610a5813163d322b304d56b41bb68dbe83513.tar.gz
virt-top-4a3610a5813163d322b304d56b41bb68dbe83513.tar.xz
virt-top-4a3610a5813163d322b304d56b41bb68dbe83513.zip
* virt-top/virt_top.ml: qemu:/// URIs (and others) don't support
virConnectGetHostname. Catch this exception.
Diffstat (limited to 'virt-top')
-rw-r--r--virt-top/virt_top.ml3
1 files changed, 3 insertions, 0 deletions
diff --git a/virt-top/virt_top.ml b/virt-top/virt_top.ml
index a621a18..a5953f3 100644
--- a/virt-top/virt_top.ml
+++ b/virt-top/virt_top.ml
@@ -137,6 +137,9 @@ OPTIONS" in
let hostname =
try C.get_hostname conn
with
+ (* qemu:/// and other URIs didn't support virConnectGetHostname until
+ * libvirt 0.3.3. Before that they'd throw a virterror. *)
+ | Libvirt.Virterror _
| Invalid_argument "virConnectGetHostname not supported" -> "unknown" in
let libvirt_version =