From a92b60ad3e20e07a6e1220931aab3fc9f97c2407 Mon Sep 17 00:00:00 2001 From: "bodong.yang" Date: Mon, 6 Nov 2023 01:44:11 +0000 Subject: [PATCH] grub@L375: minor fix --- otaclient/app/boot_control/_grub.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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