buf.write("not active\n")
else:
(path, major, minor, syncp, estt, degr, ldisk) = status
- buf.write("%s (%d:%d)" % (path, major, minor))
+ if major is None:
+ major_string = "N/A"
+ else:
+ major_string = str(major)
+
+ if minor is None:
+ minor_string = "N/A"
+ else:
+ minor_string = str(minor)
+
+ buf.write("%s (%s:%s)" % (path, major_string, minor_string))
if dtype in (constants.LD_MD_R1, constants.LD_DRBD7, constants.LD_DRBD8):
if syncp is not None:
sync_text = "*RECOVERING* %5.2f%%," % syncp