Treat sg_ses '<empty>' element descriptor as no name
Some enclosures (Xyratex/NetApp shelves) leave SES element descriptor strings blank; sg_ses prints the literal '<empty>'. Skip it so temp sensors fall back to a generic 'Temp N' label instead of '<empty>'.
This commit is contained in:
@@ -220,7 +220,10 @@ def _parse_element_descriptors(text: str) -> dict[tuple[str, int], str]:
|
||||
continue
|
||||
idx = int(m.group(1))
|
||||
name = m.group(2).strip()
|
||||
if name:
|
||||
# sg_ses prints "<empty>" when an enclosure leaves the descriptor
|
||||
# string blank — treat that as no name so callers fall back to a
|
||||
# generic label.
|
||||
if name and name.lower() != "<empty>":
|
||||
names[(etype, idx)] = name
|
||||
return names
|
||||
|
||||
|
||||
Reference in New Issue
Block a user