From: Jacopo Dall'Aglio Date: Fri, 17 May 2019 07:58:54 +0000 (+0000) Subject: utilities.inc: fix return None type error X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=ad77ed4e5b6370abc1bc7813684b1808a5c18185;p=meta-freescale.git utilities.inc: fix return None type error Function make_dtb_boot_files now always returns and raises an error if a KERNEL_DEVICETREE entry filename extension is not .dtb or .dtbo. Signed-off-by: Jacopo Dall'Aglio --- diff --git a/conf/machine/include/utilities.inc b/conf/machine/include/utilities.inc index a56fd963..164d77f4 100644 --- a/conf/machine/include/utilities.inc +++ b/conf/machine/include/utilities.inc @@ -7,10 +7,11 @@ def make_dtb_boot_files(d): alldtbs = d.getVar('KERNEL_DEVICETREE') def transform(dtb): - if dtb.endswith('dtb') or dtb.endswith('dtbo'): + if not (dtb.endswith('dtb') or dtb.endswith('dtbo')): # eg: whatever/bcm2708-rpi-b.dtb has: # DEPLOYDIR file: bcm2708-rpi-b.dtb # destination: bcm2708-rpi-b.dtb - return os.path.basename(dtb) + bb.error("KERNEL_DEVICETREE entry %s is not a .dtb or .dtbo file." % (dtb) ) + return os.path.basename(dtb) return ' '.join([transform(dtb) for dtb in alldtbs.split() if dtb])