mirror of
https://opendev.org/x/pyghmi
synced 2025-07-25 05:31:11 +00:00
Fix UUID padding problem
Correct the format width since it is the width of the characters vs bytes. Change-Id: Ie01036584ebeba674475e07d2786ea02f6db2f98
This commit is contained in:
@@ -28,7 +28,7 @@ def decode_wireformat_uuid(rawguid):
|
||||
rawguid = bytearray(rawguid)
|
||||
lebytes = struct.unpack_from('<IHH', buffer(rawguid[:8]))
|
||||
bebytes = struct.unpack_from('>HHI', buffer(rawguid[8:]))
|
||||
return '{0:04X}-{1:02X}-{2:02X}-{3:02X}-{4:02X}{5:04X}'.format(
|
||||
return '{0:08X}-{1:04X}-{2:04X}-{3:04X}-{4:04X}{5:08X}'.format(
|
||||
lebytes[0], lebytes[1], lebytes[2], bebytes[0], bebytes[1], bebytes[2])
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user