user-panel #9

Merged
cayop merged 25 commits from user-panel into main 2024-10-11 14:26:36 +00:00
Showing only changes of commit b36636d28e - Show all commits

View file

@ -29,6 +29,7 @@ def get_mac(hwinfo):
if "HW Address:" in n: if "HW Address:" in n:
if low_ix <= ix: if low_ix <= ix:
mac = c.split(" ")[-1] mac = c.split(" ")[-1]
print(f"MAC: {mac}")
return mac return mac
@ -105,5 +106,8 @@ class Build:
sku = self.get_sku() sku = self.get_sku()
hwinfo_raw = snapshot["data"]["hwinfo"] hwinfo_raw = snapshot["data"]["hwinfo"]
mac = get_mac(hwinfo_raw) or "" mac = get_mac(hwinfo_raw) or ""
if not mac:
print("WARNING!! No there are MAC address")
print(f"{manufacturer}{model}{chassis}{serial_number}{sku}{mac}")
return f"{manufacturer}{model}{chassis}{serial_number}{sku}{mac}" return f"{manufacturer}{model}{chassis}{serial_number}{sku}{mac}"