29 lines
812 B
Diff
29 lines
812 B
Diff
|
|
||
|
Subject: support: If getting HV version fails, just use 0
|
||
|
From: Cole Robinson crobinso@redhat.com Mon Aug 1 16:16:01 2011 -0400
|
||
|
Date: Mon Aug 1 16:16:01 2011 -0400:
|
||
|
Git: c11616761952697dadb2b9a88b761d9816060c54
|
||
|
|
||
|
If libvirt has issues building qemu caps, version can fail.
|
||
|
|
||
|
Index: virtinst-0.600.0/virtinst/support.py
|
||
|
===================================================================
|
||
|
--- virtinst-0.600.0.orig/virtinst/support.py
|
||
|
+++ virtinst-0.600.0/virtinst/support.py
|
||
|
@@ -373,9 +373,12 @@ def _hv_ver(conn, uri):
|
||
|
if not _try_command(cmd, args):
|
||
|
return 0
|
||
|
|
||
|
- ret = cmd(*args)
|
||
|
- if type(ret) == tuple:
|
||
|
- ret = ret[1]
|
||
|
+ try:
|
||
|
+ ret = cmd(*args)
|
||
|
+ if type(ret) == tuple:
|
||
|
+ ret = ret[1]
|
||
|
+ except libvirt.libvirtError:
|
||
|
+ ret = 0
|
||
|
|
||
|
return ret
|
||
|
|