Decode output of fru print

Decodes bytes object of fru print to string, was failing
during an ilo inspection.

Change-Id: Ieed55ffca1e839ff5a5dfe523038ba03ea14d0d7
Closes-Bug: 1853210
(cherry picked from commit 83266ff678)
This commit is contained in:
Antony Messerli 2019-11-19 19:55:44 -06:00 committed by Shivanand Tendulker
parent 13fdad8650
commit 5dd5db26d5
2 changed files with 5 additions and 2 deletions

View File

@ -59,7 +59,10 @@ def _exec_ipmitool(driver_info, command):
{'out': out, 'err': err, 'code': process.returncode})
except Exception:
pass
return out
if out:
return out.decode()
else:
return out
def get_ilo_version(ilo_fw_str):

View File

@ -28,7 +28,7 @@ NIC_FRU_OUT_TUPLE = ((
"Product Name : HP Ethernet 1Gb 4-port 331FLR Adapter\n"
"Product Part Number : 629135-B21\n"
"Product Version : 00\n"
"Product Serial : CN84170RX5"), None)
"Product Serial : CN84170RX5").encode('ascii'), None)
NIC_FRU_OUT = (
"Board Mfg Date : Mon Apr 28 23:16:00 2014\n"