A generator object always evaluates to True, we have to wrap it with
any() to check if it contains anything.
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 ''}"