From 14b3bb5d0cd975affa1405dba86e2e45fa0de411 Mon Sep 17 00:00:00 2001 From: wangbo28 Date: Fri, 5 Feb 2016 15:37:38 +0800 Subject: [PATCH] Fix UUID padding problem Correct the format width since it is the width of the characters vs bytes. Change-Id: Ie01036584ebeba674475e07d2786ea02f6db2f98 --- pyghmi/ipmi/private/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyghmi/ipmi/private/util.py b/pyghmi/ipmi/private/util.py index daec6647..660f56dd 100644 --- a/pyghmi/ipmi/private/util.py +++ b/pyghmi/ipmi/private/util.py @@ -28,7 +28,7 @@ def decode_wireformat_uuid(rawguid): rawguid = bytearray(rawguid) lebytes = 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])