File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 } , "
You can’t perform that action at this time.
0 commit comments