pmb.install.recovery: Assert that partitions are not None (MR 2464)

They should definitely not be None here, thus assert it so we don't need
to keep checking for None later.
This commit is contained in:
Newbyte 2024-10-29 22:22:10 +01:00
parent b49da9ad82
commit d05d57b37e
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -43,6 +43,13 @@ def create_zip(args: PmbArgs, chroot: Chroot, device: str):
pmb.flasher.check_partition_blacklist(deviceinfo, key, fvalue)
if (
fvars["$PARTITION_KERNEL"] is None
or fvars["$PARTITION_INITFS"] is None
or fvars["$PARTITION_ROOTFS"] is None
):
raise AssertionError("Partitions should not be None at this point")
# Create config file for the recovery installer
options = {
"DEVICE": device,