2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-15 04:07:48 +00:00

Fix instances with no agentless update adapter

Some XCC platforms and all IMM platforms cannot use the
firmware update url.

Change-Id: If6395df9f087626427118d73abbd33e20ecb7b0f
This commit is contained in:
Jarrod Johnson 2019-06-21 09:08:20 -04:00
parent 8257aa0279
commit 79830da7d1

View File

@ -482,7 +482,7 @@ class IMMClient(object):
fwu = self.wc.grab_json_response(self.ADP_FU_URL,
referer=self.adp_referer)
else:
fwu = None
fwu = {}
if adapterdata:
self.datacache['lenovo_cached_adapters_fu'] = (
(adapterdata, fwu), util._monotonic_time())
@ -520,7 +520,7 @@ class IMMClient(object):
except ValueError:
pass
yield ('{0} {1}'.format(aname, fname), bdata)
for fwi in fwu.get('items'):
for fwi in fwu.get('items', []):
if fwi.get('key', -1) == adata.get('key', -2):
if fwi.get('fw_status', 0) == 2:
bdata = {}