[Kimchi-devel] [PATCH] Fix SLES version checking in interfaces.py

Rodrigo Trujillo rodrigo.trujillo at linux.vnet.ibm.com
Wed May 20 15:18:53 UTC 2015


This patch fixes a bug in interfaces.py. A parenthesis is missing, so
when the user tries to create a SLES ppc64 guest, kimchi is going to
raise the error:
AttributeError: 'unicode' object has no attribute 'version'

Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo at linux.vnet.ibm.com>
---
 src/kimchi/xmlutils/interface.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/kimchi/xmlutils/interface.py b/src/kimchi/xmlutils/interface.py
index f725821..82ac505 100644
--- a/src/kimchi/xmlutils/interface.py
+++ b/src/kimchi/xmlutils/interface.py
@@ -56,7 +56,7 @@ def get_iface_xml(params, arch=None, os_distro=None, os_version=None):
        ((os_distro == 'ubuntu' and
          LooseVersion(os_version) >= LooseVersion('14.04')) or
         (os_distro == 'sles' and
-         LooseVersion(os_version >= LooseVersion('12')))):
+         LooseVersion(os_version) >= LooseVersion('12'))):
         interface.append(E.driver(name='qemu'))
 
     return ET.tostring(interface, encoding='utf-8', pretty_print=True)
-- 
2.1.0




More information about the Kimchi-devel mailing list