From eb1070462a19e9bee63b8c5df2ba219f1ca53c0d Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 20 Jul 2020 14:50:56 -0400 Subject: [PATCH] In python2, we must change to bytes explicitly. While python 3 is ok, with using a bytearray slice, for pythton2 we have to explicitly make it bytes. Change-Id: I7ba4f466d398892715b72695818b09d1cf57a794 --- pyghmi/ipmi/oem/lenovo/imm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyghmi/ipmi/oem/lenovo/imm.py b/pyghmi/ipmi/oem/lenovo/imm.py index 9e70d1fa..68206961 100644 --- a/pyghmi/ipmi/oem/lenovo/imm.py +++ b/pyghmi/ipmi/oem/lenovo/imm.py @@ -896,7 +896,7 @@ class XCCClient(IMMClient): settings['smm']['value'] = None smmip = self.get_property('/v2/ibmc/smm/smm_ip') if smmip: - smmip = socket.inet_ntoa(smmip[-1::-1]) + smmip = socket.inet_ntoa(bytes(smmip[-1::-1])) settings['smm_ip'] = { 'help': 'Current IPv4 address as reported by SMM, read-only', 'value': smmip,