diff --git a/otaclient/app/boot_control/_grub.py b/otaclient/app/boot_control/_grub.py index f24cbc505..421901897 100644 --- a/otaclient/app/boot_control/_grub.py +++ b/otaclient/app/boot_control/_grub.py @@ -372,10 +372,9 @@ def _detect_standby_slot(self, active_dev: str) -> Tuple[str, str]: """ dev_path = self._get_sibling_dev(active_dev) _dev_path_ma = self.DEV_PATH_PA.match(dev_path) - assert _dev_path_ma and ( - _pid := _dev_path_ma.group("partition_id") - ), f"failed to parse standby device path: {dev_path=}" + assert _dev_path_ma, f"dev path is invalid for OTA: {dev_path}" + _pid = _dev_path_ma.group("partition_id") slot_name = f"{self.SLOT_NAME_PREFIX}{_pid}" return slot_name, dev_path