2
0
mirror of https://opendev.org/x/pyghmi synced 2025-03-19 09:57:43 +00:00

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
This commit is contained in:
Jarrod Johnson 2020-07-20 14:50:56 -04:00
parent ba05b8f883
commit eb1070462a

View File

@ -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,