]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
qemu.bbclass: fix a python TypeError
authorMing Liu <liu.ming50@gmail.com>
Sun, 7 Jan 2024 10:34:48 +0000 (11:34 +0100)
committerSteve Sakoman <steve@sakoman.com>
Fri, 2 Feb 2024 21:35:51 +0000 (11:35 -1000)
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.

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit b619197bd52a4a99a9989e7ea6fb7032415b1e42)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/classes-recipe/qemu.bbclass

index 874b15127cb7769dea7ca1753e5d756a47ecfe10..dbb5ee0b666067a7c5a861baa85288a3dbbaa1a4 100644 (file)
@@ -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) + " "