Prefer pkg_version

Use the pkg_version where available, it seems to match more.

Change-Id: Ib419539adff86334454bca838a970691604fc104
This commit is contained in:
Jarrod Johnson 2025-04-17 15:56:21 -04:00
parent 6ec04d585a
commit e074eb1470
2 changed files with 6 additions and 2 deletions

View File

@ -617,7 +617,9 @@ class IMMClient(object):
skipkeys.add(fwi['key'])
if fwi.get('fw_status', 0) == 2:
bdata = {}
if 'fw_version_pend' in fwi:
if 'fw_pkg_version' in fwi and fwi['fw_pkg_version']:
bdata['version'] = fwi['fw_pkg_version']
elif 'fw_version_pend' in fwi:
bdata['version'] = fwi['fw_version_pend']
yield '{0} Pending Update'.format(aname), bdata
for fwi in fwu.get('items', []):

View File

@ -660,7 +660,9 @@ class OEMHandler(generic.OEMHandler):
skipkeys.add(fwi['key'])
if fwi.get('fw_status', 0) == 2:
bdata = {}
if 'fw_version_pend' in fwi:
if 'fw_pkg_version' in fwi and fwi['fw_pkg_version']:
bdata['version'] = fwi['fw_pkg_version']
elif 'fw_version_pend' in fwi:
bdata['version'] = fwi['fw_version_pend']
yield '{0} Pending Update'.format(aname), bdata
for fwi in fdata.get('items', []):