From eb98259f6b6d0bd495fd5e9bcefbb44920657051 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 11 Jul 2018 12:49:20 -0400 Subject: [PATCH] Fix build id of FPC FPC does BCD encode of the build id. Fix the display. Change-Id: I921c9cb8cde687ed700bb400dc4081d7f67410a8 --- pyghmi/ipmi/oem/lenovo/nextscale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyghmi/ipmi/oem/lenovo/nextscale.py b/pyghmi/ipmi/oem/lenovo/nextscale.py index 88f09571..a775f2c3 100644 --- a/pyghmi/ipmi/oem/lenovo/nextscale.py +++ b/pyghmi/ipmi/oem/lenovo/nextscale.py @@ -209,7 +209,7 @@ def get_fpc_firmware(bmcver, ipmicmd, fpcorsmm): elif len(builddata) == 8: builddata = builddata[1:] # discard the 'completion code' name = 'FPC' - buildid = '{0}{1}'.format(builddata[-2], chr(builddata[-1])) + buildid = '{0:02X}{1}'.format(builddata[-2], chr(builddata[-1])) yield (name, {'version': bmcver, 'build': buildid}) yield ('PSOC', {'version': '{0}.{1}'.format(builddata[2], builddata[3])})