kvm: fix bug while fetching -device list
authorGuido Trotter <ultrotter@google.com>
Fri, 25 Jan 2013 11:31:22 +0000 (12:31 +0100)
committerGuido Trotter <ultrotter@google.com>
Fri, 25 Jan 2013 13:25:24 +0000 (14:25 +0100)
commitbc0fed4b43d2e7c7440423cddfded08cdefd163d
treee8fb2fc9dc8a473d443b9b31effb85b738f89956
parent4b8b172db2da14e7bf51a6ef54afac8cf97c8c05
kvm: fix bug while fetching -device list

_GetKVMOutput expects the command to succeed, but unfortunately on some
versions of kvm "-device ?" will output a correct list of devices, while
exiting with an error code.

To fix this we accept failure in that case (note that this doesn't
change the situation when this command is not supported, as in that case
the output will still not contain the correct string).

This patch also updates the docstring, adding the parameter types and
description.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
lib/hypervisor/hv_kvm.py