2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-27 19:37:44 +00:00

Add debug in case of failure to retrieve TSM

This could help ascertain why the information is
missing upon occasion.

Change-Id: I41133cc168eafd90938c6dbb54a73ff214abdb21
This commit is contained in:
Jarrod Johnson 2019-11-22 09:36:01 -05:00
parent 9d5e570f0e
commit 9bff4096b1

View File

@ -112,7 +112,10 @@ class TsmHandler(generic.OEMHandler):
gotinfo = True
break
name = 'TSM'
fwinf = wc.grab_json_response('/api/get-sysfwinfo')
fwinf, status = wc.grab_json_response_with_status('/api/get-sysfwinfo')
if status != 200:
raise Exception('Error {0} retrieving TSM version: {1}'.format(
status, fwinf))
for cinf in fwinf:
bmcinf = {
'version': cinf['fw_ver'],