From: Daan De Meyer Date: Mon, 15 Sep 2025 11:55:42 +0000 (+0200) Subject: Fix if check in install_systemd_boot() X-Git-Tag: v26~116^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d4bb1ac4cb80f7a3fa574317de70ae0cbf72f1d;p=thirdparty%2Fmkosi.git Fix if check in install_systemd_boot() A generator object always evaluates to True, we have to wrap it with any() to check if it contains anything. --- diff --git a/mkosi/bootloader.py b/mkosi/bootloader.py index d308a4133..7e890c614 100644 --- a/mkosi/bootloader.py +++ b/mkosi/bootloader.py @@ -664,7 +664,7 @@ def install_systemd_boot(context: Context) -> None: directory = context.root / "usr/lib/systemd/boot/efi" signed = context.config.bootloader.is_signed() - if not directory.glob("*.efi.signed" if signed else "*.efi"): + if not any(directory.glob("*.efi.signed" if signed else "*.efi")): if context.config.bootable == ConfigFeature.enabled: die( f"An EFI bootable image with systemd-boot was requested but a {'signed ' if signed else ''}"