mirror of
https://opendev.org/x/pyghmi
synced 2025-10-25 16:35:20 +00:00
Handle missing UUID
Some TSM FRU elements do not have a FRU entry. They may be marked by all spaces, all 0xff, or all 0x00. Skip UUID if it is one of these obviously invalid values. Change-Id: I90c8bbe3c66754bcb6d6200b63a2ff2c29ae63ec
This commit is contained in:
@@ -342,7 +342,8 @@ class OEMHandler(generic.OEMHandler):
|
||||
# to strip \x00 from the end of text strings. Work around this
|
||||
# by padding with \x00 to the right if less than 16 long
|
||||
byteguid.extend('\x00' * (16 - len(byteguid)))
|
||||
fru['UUID'] = util.decode_wireformat_uuid(byteguid)
|
||||
if byteguid not in ('\x20' * 16, '\x00' * 16, '\xff' * 16):
|
||||
fru['UUID'] = util.decode_wireformat_uuid(byteguid)
|
||||
except (AttributeError, KeyError):
|
||||
pass
|
||||
return fru
|
||||
|
||||
Reference in New Issue
Block a user