This commit is contained in:
Cayo Puigdefabregas 2022-04-05 11:04:16 +02:00
parent 7f0184f049
commit bf77934fdb
1 changed files with 4 additions and 1 deletions

View File

@ -435,7 +435,10 @@ class ParseSnapshotLsHw:
return 'SODIMM' if 'SODIMM' in channel else 'DIMM' return 'SODIMM' if 'SODIMM' in channel else 'DIMM'
def get_uuid(self): def get_uuid(self):
dmi_uuid = 'undefined'
if self.dmi.get("System"):
dmi_uuid = self.dmi.get("System")[0].get("UUID") dmi_uuid = self.dmi.get("System")[0].get("UUID")
try: try:
uuid.UUID(dmi_uuid) uuid.UUID(dmi_uuid)
except (ValueError, AttributeError) as err: except (ValueError, AttributeError) as err: