From d3de6116f8276fee8475bf16dec6c999c6a4b930 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 15 Jan 2021 08:45:49 -0500 Subject: [PATCH] Fix XCC use of Redfish in OEM and python3 base64 demands bytes input and puts bytes out, and we need str in and str out. Change-Id: I68ab89d63a4d9720e403154a0153cebfc492b4ad --- pyghmi/ipmi/oem/lenovo/imm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyghmi/ipmi/oem/lenovo/imm.py b/pyghmi/ipmi/oem/lenovo/imm.py index bd311510..2d680264 100644 --- a/pyghmi/ipmi/oem/lenovo/imm.py +++ b/pyghmi/ipmi/oem/lenovo/imm.py @@ -950,7 +950,8 @@ class XCCClient(IMMClient): {'Action': 'Bios.ResetBios'}, headers={ 'Authorization': 'Basic %s' % base64.b64encode( - self.username + ':' + self.password), + (self.username + ':' + self.password).encode('utf8') + ).decode('utf8'), 'Content-Type': 'application/json' } )