Skip to content

Commit 72085c3

Browse files
committed
minor update
1 parent 2c38be0 commit 72085c3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/otaclient_common/cmdhelper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ def _read_sysfs_rotational(parent_devname: str) -> bool | None:
4949
sysfs_path = Path(f"/sys/block/{parent_devname}/queue/rotational")
5050
try:
5151
return sysfs_path.read_text().strip() == "1"
52-
except OSError:
53-
logger.debug(f"failed to read sysfs rotational for {parent_devname}")
52+
except Exception as e:
53+
logger.warning(f"failed to read sysfs rotational for {parent_devname}: {e!r}")
5454
return None
5555

5656

@@ -71,7 +71,7 @@ def detect_storage_device_type(rootfs_devpath: str) -> str:
7171
A string ("L1", "L2", or "L3") indicating the performance tier.
7272
"""
7373
try:
74-
parent_devpath = get_parent_dev(rootfs_devpath, raise_exception=True)
74+
parent_devpath = get_parent_dev(rootfs_devpath, raise_exception=True).strip()
7575
except Exception:
7676
logger.warning(
7777
f"failed to get parent device for {rootfs_devpath}, "

0 commit comments

Comments
 (0)