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

Commit ffa3510

Browse files
authored
Merge pull request #79 from packethost/fix-dell-version
Fix dell version
2 parents 9ddf260 + 0307c4b commit ffa3510

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packethardware/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,11 +536,12 @@ def get_mc_info(prop):
536536
# Dell version encoding
537537
# Their version is A.B.C.D, but we only report A.B.C as D is always 0
538538
# aux: "0x00 0x1e 0x1e 0x00" -> ".30", not ".30.00"
539+
# also "0x00 0x05 0x00 0xab" should be seen as ".00.171" -> ".00"
539540
if normalize_vendor(get_mc_info("vendor")) == "Dell Inc.":
540541
return (
541542
__re_multiline_first(mc_info, regex[prop]).strip()
542543
+ "."
543-
+ str(int(get_mc_info("aux")[5:9], 16))
544+
+ "{:02d}".format(int(get_mc_info("aux")[10:14], 16))
544545
)
545546

546547
# firmware_version provides X.Y, aux 1st byte provides .Z

0 commit comments

Comments
 (0)