connect: Always have a default hv selection

This commit is contained in:
Cole Robinson 2011-07-18 20:27:20 -04:00
parent f177e4ac44
commit b83def97ea
1 changed files with 2 additions and 4 deletions

View File

@ -139,12 +139,10 @@ class vmmConnect(vmmGObjectUI):
def set_default_hypervisor(self):
default = virtinst.util.default_connection()
if default is None:
self.widget("hypervisor").set_active(-1)
if not default or default.startswith("qemu"):
self.widget("hypervisor").set_active(1)
elif default.startswith("xen"):
self.widget("hypervisor").set_active(0)
elif default.startswith("qemu"):
self.widget("hypervisor").set_active(1)
def add_service(self, interface, protocol, name, type, domain, flags):
ignore = flags