kvm: make qmp connections more robust
authorGuido Trotter <ultrotter@google.com>
Thu, 8 Dec 2011 13:28:32 +0000 (13:28 +0000)
committerGuido Trotter <ultrotter@google.com>
Thu, 8 Dec 2011 16:03:11 +0000 (16:03 +0000)
commitfc84cd5d479f164cf34ec33b70e75f917489ac30
tree7a39846b7356725a1449887c3c23776fb9dc23bc
parenteb93b6734045469b68c8c6a4aa84de526b894555
kvm: make qmp connections more robust

Currently qmp fails at connect() time if there are socket errors. (eg.
if the instance was started without qmp). Add some better checking.

Also in the only place where we use it avoid hiding the error connecting
to the socket as a failure to read the password file.

In addition one variable is renamed because its name now conflicts with
the newly imported stat module.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
lib/hypervisor/hv_kvm.py