From: "Enrico Jörns" <ejo@pengutronix.de>
To: openembedded-core@lists.openembedded.org
Cc: yocto@pengutronix.de
Subject: [PATCH 2/2] wic: bootimg-efi: fix error handling
Date: Tue, 4 Jun 2024 10:06:21 +0200 [thread overview]
Message-ID: <20240604080621.1885249-2-ejo@pengutronix.de> (raw)
In-Reply-To: <20240604080621.1885249-1-ejo@pengutronix.de>
If we check for empty variables, it does not make sense to print their
content in case they are empty.
Additionally, the error message in the 'kernel' check attempted to print
the wrong variable ('target') which was not even defined, yet.
Also, raising WicError doesn't require an extra newline.
Signed-off-by: Enrico Jörns <ejo@pengutronix.de>
---
scripts/lib/wic/plugins/source/bootimg-efi.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py
index 13a9cddf4e..7cc5131541 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -428,10 +428,10 @@ class BootimgEFIPlugin(SourcePlugin):
elif source_params['loader'] == 'uefi-kernel':
kernel = get_bitbake_var("KERNEL_IMAGETYPE")
if not kernel:
- raise WicError("Empty KERNEL_IMAGETYPE %s\n" % target)
+ raise WicError("Empty KERNEL_IMAGETYPE")
target = get_bitbake_var("TARGET_SYS")
if not target:
- raise WicError("Unknown arch (TARGET_SYS) %s\n" % target)
+ raise WicError("Empty TARGET_SYS")
if re.match("x86_64", target):
kernel_efi_image = "bootx64.efi"
--
2.39.2
next prev parent reply other threads:[~2024-06-04 8:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-04 8:06 [PATCH 1/2] wic: engine.py: use raw string for escape sequence Enrico Jörns
2024-06-04 8:06 ` Enrico Jörns [this message]
2024-07-08 17:56 ` [OE-core] " Gundlupet Raju, Sandeep
2024-07-08 21:32 ` Richard Purdie
2024-07-09 13:12 ` Steve Sakoman
2024-07-09 15:21 ` Gundlupet Raju, Sandeep
2024-07-09 15:41 ` Steve Sakoman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240604080621.1885249-2-ejo@pengutronix.de \
--to=ejo@pengutronix.de \
--cc=openembedded-core@lists.openembedded.org \
--cc=yocto@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox