Skip to contentSkip to conversation

qemu.bbclass: fix a python TypeError

PATCH New [email protected] 1 participant 1 message Jan 7, 2024

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 qemu.bbclass: fix a python TypeError

From: Ming Liu <[email protected]>

QEMU_OPTIONS can be empty which will trigger a exception TypeError:
| can only concatenate str (not "NoneType") to str. Fix it by setting a empty string.

ALso removed two useless blanks.

---
 meta/classes-recipe/qemu.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes-recipe/qemu.bbclass +1 -1
index 874b15127c..dbb5ee0b66 100644
@@ -34,7 +34,7 @@ def qemu_wrapper_cmdline(data, rootfs_path, library_paths):
     if qemu_binary == "qemu-allarch":
         qemu_binary = "qemuwrapper"
 
-    qemu_options = data.getVar("QEMU_OPTIONS")    
+    qemu_options = data.getVar("QEMU_OPTIONS") or ""
 
     return "PSEUDO_UNLOAD=1 " + qemu_binary + " " + qemu_options + " -L " + rootfs_path\
             + " -E LD_LIBRARY_PATH=" + ":".join(library_paths) + " "
Signature · 1 line
2.34.1