[Kimchi-devel] [PATCH v2 1/4] Parse osinfo.lookup return parameters correctly
Crístian Deives
cristiandeives at gmail.com
Wed Apr 15 03:43:38 UTC 2015
The function "osinfo.lookup" returns the tuple (OS version, OS distro).
However, the function VMIfacesModel.create is parsing that tuple as (OS
distro, OS version), which is wrong.
Use the correct order (OS version, OS distro) of the osinfo.lookup
return parameters.
Signed-off-by: Crístian Deives <cristiandeives at gmail.com>
---
src/kimchi/model/vmifaces.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/kimchi/model/vmifaces.py b/src/kimchi/model/vmifaces.py
index 0c10fa9..501336c 100644
--- a/src/kimchi/model/vmifaces.py
+++ b/src/kimchi/model/vmifaces.py
@@ -61,7 +61,7 @@ class VMIfacesModel(object):
break
os_data = VMModel.vm_get_os_metadata(dom, self.caps.metadata_support)
- os_distro, os_version = os_data
+ os_version, os_distro = os_data
xml = get_iface_xml(params, conn.getInfo()[0], os_distro, os_version)
dom.attachDeviceFlags(xml, libvirt.VIR_DOMAIN_AFFECT_CURRENT)
--
2.1.0
More information about the Kimchi-devel
mailing list