mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
systemd-boot-builder: simplify conditions
This commit is contained in:
parent
1e3deb3d8a
commit
f339bdf84c
@ -230,10 +230,10 @@ def remove_old_entries(gens: list[SystemIdentifier]) -> None:
|
|||||||
gen_number = int(rex_generation.sub(r"\1", path))
|
gen_number = int(rex_generation.sub(r"\1", path))
|
||||||
except ValueError:
|
except ValueError:
|
||||||
continue
|
continue
|
||||||
if not (prof, gen_number, None) in gens:
|
if (prof, gen_number, None) not in gens:
|
||||||
os.unlink(path)
|
os.unlink(path)
|
||||||
for path in glob.iglob(f"{BOOT_MOUNT_POINT}/{NIXOS_DIR}/*"):
|
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)
|
os.unlink(path)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user