[elbe-devel] [PATCH] kvm: avoid unboundlocalerror
Manuel Traut
manut at linutronix.de
Thu Jul 12 16:11:47 CEST 2018
/usr/bin/kvm: 2: exec: qemu-system-x86_64: not found
Traceback (most recent call last):
File "./elbe", line 52, in <module>
mod = __import__(modname)
File "/home/elbe/elbepack/commands/initvm.py", line 13, in <module>
from elbepack.initvmaction import InitVMAction, InitVMError
File "/home/elbe/elbepack/initvmaction.py", line 18, in <module>
from elbepack.elbexml import ElbeXML, ValidationError, ValidationMode
File "/home/elbe/elbepack/elbexml.py", line 13, in <module>
from elbepack.xmldefaults import ElbeDefaults
File "/home/elbe/elbepack/xmldefaults.py", line 123, in <module>
"interpreter": find_kvm_exe()[0],
File "/home/elbe/elbepack/kvm.py", line 34, in find_kvm_exe
return fname, version
UnboundLocalError: local variable 'version' referenced before assignment
WARNING: exit code 1 from a shell command.
DEBUG: Python function do_compile finished
Signed-off-by: Manuel Traut <manut at linutronix.de>
---
elbepack/kvm.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/elbepack/kvm.py b/elbepack/kvm.py
index 2b67d5c5..b236ff39 100644
--- a/elbepack/kvm.py
+++ b/elbepack/kvm.py
@@ -17,6 +17,7 @@ kvm_exe_list = [
def find_kvm_exe():
+ version = ""
for fname in kvm_exe_list:
if os.path.isfile(fname) and os.access(fname, os.X_OK):
# determine kvm version
--
2.18.0
More information about the elbe-devel
mailing list