Skip to content
This repository was archived by the owner on Dec 11, 2025. It is now read-only.

Commit 359cabb

Browse files
committed
Normalize rota parameter to string even if boolean
Signed-off-by: Olivier FAURAX <olivier.faurax@eu.equinix.com>
1 parent 3f07eef commit 359cabb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packethardware/component/disk.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ def __init__(self, lsblk):
2525
"size": str(self.__size()),
2626
"devname": self.lsblk["name"],
2727
"blockdevmodel": self.lsblk["model"].strip(),
28-
"rota": self.lsblk["rota"],
28+
"rota": (
29+
self.lsblk["rota"]
30+
if isinstance(self.lsblk["rota"], str)
31+
else "1" if self.lsblk["rota"] else "0"
32+
),
2933
}
3034

3135
if self.__is_nvme():

0 commit comments

Comments
 (0)