[PATCH] wic: Standardize on percent-style formatting in exceptions
Gaël PORTAY <[email protected]> Thu, 2 Jul 2026 06:52:41 +0200
| Newsgroups | org.yoctoproject.lists.yocto-patches |
|---|---|
| Message-ID | <[email protected]> |
Switch from lazy formatting with logging arguments (logger.debug("string
%s", var)) to immediate percent operator formatting ("string %s" % var)
for consistency across the codebase.
This ensures unified string formatting style throughout the project.
---
Hello,
I may apply that change to logging as well, but there is much more
occurences ;)
Regards,
Gaël
src/wic/plugins/source/bootimg_efi.py | 2 +-
src/wic/plugins/source/isoimage_isohybrid.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/wic/plugins/source/bootimg_efi.py b/src/wic/plugins/source/bootimg_efi.py
index fe6c222..7cdd444 100644
--- a/src/wic/plugins/source/bootimg_efi.py
+++ b/src/wic/plugins/source/bootimg_efi.py
@@ -171,7 +171,7 @@ class BootimgEFIPlugin(SourcePlugin):
"%s for systemd-boots's boot.conf", configfile)
else:
raise WicError("configfile is specified but failed to "
- "get it from %s.", configfile)
+ "get it from %s." % configfile)
else:
# Create systemd-boot configuration using parameters from wks file
kernel = get_bitbake_var("KERNEL_IMAGETYPE")
diff --git a/src/wic/plugins/source/isoimage_isohybrid.py b/src/wic/plugins/source/isoimage_isohybrid.py
index 0a3ecd3..15dae01 100644
--- a/src/wic/plugins/source/isoimage_isohybrid.py
+++ b/src/wic/plugins/source/isoimage_isohybrid.py
@@ -101,7 +101,7 @@ class IsoImagePlugin(SourcePlugin):
configfile)
else:
raise WicError("configfile is specified "
- "but failed to get it from %s", configfile)
+ "but failed to get it from %s" % configfile)
else:
splash = os.path.join(target_dir, "splash.jpg")
if os.path.exists(splash):
--
2.43.0