Avoid broken output format for new OSDs

This commit is contained in:
Joshua Boniface 2023-11-03 23:54:10 -04:00
parent 7f5dd385b5
commit 75135f6d5f
1 changed files with 4 additions and 1 deletions

View File

@ -457,7 +457,10 @@ def format_list_osd(config, osd_list):
osd_information["device"] = f"{osd_information['device']} *s" osd_information["device"] = f"{osd_information['device']} *s"
# Deal with the size to human readable # Deal with the size to human readable
osd_information["stats"]["size"] = osd_information["stats"]["kb"] * 1024 if isinstance(osd_information["stats"]["kb"], int):
osd_information["stats"]["size"] = osd_information["stats"]["kb"] * 1024
else:
osd_information["stats"]["size"] = "N/A"
for datatype in "size", "wr_data", "rd_data": for datatype in "size", "wr_data", "rd_data":
databytes = osd_information["stats"][datatype] databytes = osd_information["stats"][datatype]
if isinstance(databytes, int): if isinstance(databytes, int):