diff --git a/otaclient/app/boot_control/_grub.py b/otaclient/app/boot_control/_grub.py index a0352aacf..f24cbc505 100644 --- a/otaclient/app/boot_control/_grub.py +++ b/otaclient/app/boot_control/_grub.py @@ -357,10 +357,9 @@ def _detect_active_slot(self) -> Tuple[str, str]: """ dev_path = CMDHelperFuncs.get_current_rootfs_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 active 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