Skip to content

Commit

Permalink
grub@L360: minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Bodong-Yang committed Nov 6, 2023
1 parent c8e51d7 commit 74d4dd3
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 @@ -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

Expand Down

0 comments on commit 74d4dd3

Please sign in to comment.