[elbe-devel] [PATCH 01/25] kvm.py - ensure to use string
Manuel Traut
manut at linutronix.de
Fri Dec 1 16:50:58 CET 2017
if line is an integer the compare will fail.
Signed-off-by: Manuel Traut <manut at linutronix.de>
---
elbepack/kvm.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/elbepack/kvm.py b/elbepack/kvm.py
index 2f2288a2..16e613a5 100644
--- a/elbepack/kvm.py
+++ b/elbepack/kvm.py
@@ -32,8 +32,8 @@ def find_kvm_exe ():
# determine kvm version
cmd = subprocess.Popen (fname + ' --version', shell=True, stdout=subprocess.PIPE)
for line in cmd.stdout:
- if "version" in line:
- version = line.split()[3].split('(')[0].strip()
+ if "version" in str(line):
+ version = str(line).split()[3].split('(')[0].strip()
if fname == "/usr/bin/qemu-system-x86_64":
fname += " -enable-kvm"
--
2.15.1
More information about the elbe-devel
mailing list