virt-manager/5318a2cd-cpu-model-fallback-failure-fix.patch

31 lines
1.2 KiB
Diff
Raw Normal View History

Subject: details: Fix fallback if fetching CPU models fails (bz 1072704)
From: Cole Robinson crobinso@redhat.com Thu Mar 6 11:31:09 2014 -0500
Date: Thu Mar 6 11:31:09 2014 -0500:
Git: b078ba8c3d69b62fe748d9182babef8971914277
Index: virt-manager-1.0.0/virtManager/details.py
===================================================================
--- virt-manager-1.0.0.orig/virtManager/details.py
+++ virt-manager-1.0.0/virtManager/details.py
@@ -969,8 +969,9 @@ class vmmDetails(vmmGObjectUI):
no_default = not self.is_customize_dialog
try:
- cpu_values = caps.get_cpu_values(self.vm.get_arch())
+ cpu_names = caps.get_cpu_values(self.vm.get_arch()).cpus
except:
+ cpu_names = []
logging.exception("Error populating CPU model list")
# CPU model combo
@@ -991,7 +992,7 @@ class vmmDetails(vmmGObjectUI):
model.append([_("Clear CPU configuration"), "3",
virtinst.CPU.SPECIAL_MODE_CLEAR, False])
model.append([None, None, None, True])
- for name in [c.model for c in cpu_values.cpus]:
+ for name in [c.model for c in cpu_names]:
model.append([name, name, name, False])
# Disk cache combo