Skip to content

Commit

Permalink
grub@L375: minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Bodong-Yang committed Nov 6, 2023
1 parent 74d4dd3 commit a92b60a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions otaclient/app/boot_control/_grub.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a92b60a

Please sign in to comment.