diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2024-06-29 18:02:14 +0200 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2024-06-29 19:09:02 +0200 |
commit | f339bdf84c3aef4b405e0dc6f36faacdd432b68e (patch) | |
tree | 6ed08b2ada5d638738ba9f940392f3cd0382a408 | |
parent | 1e3deb3d8a86a870d925760db1a5adecc64d329d (diff) |
systemd-boot-builder: simplify conditions
-rw-r--r-- | nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py b/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py index 694d34d1c059..ac62e4902153 100644 --- a/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py +++ b/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py @@ -230,10 +230,10 @@ def remove_old_entries(gens: list[SystemIdentifier]) -> None: gen_number = int(rex_generation.sub(r"\1", path)) except ValueError: continue - if not (prof, gen_number, None) in gens: + if (prof, gen_number, None) not in gens: os.unlink(path) for path in glob.iglob(f"{BOOT_MOUNT_POINT}/{NIXOS_DIR}/*"): - if not path in known_paths and not os.path.isdir(path): + if path not in known_paths and not os.path.isdir(path): os.unlink(path) |