virtManager.create: don't clear recommended machine if none is selected

This improves loading domcapabilities to get domcapabilities for recommended
machine, not for default machine.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Pavel Hrdina 2016-06-16 11:04:36 +02:00
parent 86e11786b5
commit 5ecc2b440a
1 changed files with 5 additions and 1 deletions

View File

@ -1640,7 +1640,11 @@ class vmmCreate(vmmGObjectUI):
def _build_guest(self, variant):
guest = self.conn.caps.build_virtinst_guest(self._capsinfo)
guest.os.machine = self._get_config_machine()
# If no machine was selected don't clear recommended machine
machine = self._get_config_machine()
if machine:
guest.os.machine = machine
# Generate UUID (makes customize dialog happy)
try: