From b49da9ad828e517054741c30f1e53dcdbf4b060a Mon Sep 17 00:00:00 2001 From: Newbyte Date: Tue, 29 Oct 2024 22:16:59 +0100 Subject: [PATCH] pmb.install.recovery: Check for None before going through blacklist (MR 2464) It doesn't really make sense to check the blacklist against None, so just skip the value if it's None. Appeases mypy. --- pmb/install/recovery.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pmb/install/recovery.py b/pmb/install/recovery.py index fee2c7fb..886edf30 100644 --- a/pmb/install/recovery.py +++ b/pmb/install/recovery.py @@ -36,7 +36,12 @@ def create_zip(args: PmbArgs, chroot: Chroot, device: str): logging.info(f"({chroot}) create recovery zip") for key in fvars: - pmb.flasher.check_partition_blacklist(deviceinfo, key, fvars[key]) + fvalue = fvars[key] + + if fvalue is None: + continue + + pmb.flasher.check_partition_blacklist(deviceinfo, key, fvalue) # Create config file for the recovery installer options = {