Avoid broken output format for new OSDs
This commit is contained in:
parent
7f5dd385b5
commit
75135f6d5f
|
@ -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):
|
||||||
|
|
Loading…
Reference in New Issue