mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
create: Clarify some bits in change_caps
This commit is contained in:
parent
1230ab57a9
commit
d2ad2bcf94
@ -847,9 +847,8 @@ class vmmCreate(vmmGObjectUI):
|
|||||||
|
|
||||||
def change_caps(self, gtype=None, arch=None):
|
def change_caps(self, gtype=None, arch=None):
|
||||||
if gtype is None:
|
if gtype is None:
|
||||||
# If none specified, prefer HVM. This way, the default install
|
# If none specified, prefer HVM so install options aren't limited
|
||||||
# options won't be limited because we default to PV. If hvm not
|
# with a default PV choice.
|
||||||
# supported, differ to guest_lookup
|
|
||||||
for g in self.conn.caps.guests:
|
for g in self.conn.caps.guests:
|
||||||
if g.os_type == "hvm":
|
if g.os_type == "hvm":
|
||||||
gtype = "hvm"
|
gtype = "hvm"
|
||||||
@ -857,10 +856,7 @@ class vmmCreate(vmmGObjectUI):
|
|||||||
|
|
||||||
(newg, newdom) = self.conn.caps.guest_lookup(os_type=gtype, arch=arch)
|
(newg, newdom) = self.conn.caps.guest_lookup(os_type=gtype, arch=arch)
|
||||||
|
|
||||||
if (self.capsguest and self.capsdomain and
|
if self.capsguest == newg and self.capsdomain and newdom:
|
||||||
(newg.arch == self.capsguest.arch and
|
|
||||||
newg.os_type == self.capsguest.os_type)):
|
|
||||||
# No change
|
|
||||||
return
|
return
|
||||||
|
|
||||||
self.capsguest = newg
|
self.capsguest = newg
|
||||||
|
Loading…
Reference in New Issue
Block a user