2
0
mirror of https://opendev.org/x/pyghmi synced 2025-08-15 07:30:18 +00:00

A redfish device with no OEM should be generic

Fix the fallback lookup to avoid a stack trace.

Change-Id: Iee2b0891a91687cf13d74936161f548da49c3a6a
This commit is contained in:
Jarrod Johnson
2020-06-03 08:55:21 -04:00
parent 60f31bb671
commit e0b06fe39a

View File

@@ -24,7 +24,7 @@ def get_oem_handler(sysinfo, sysurl, webclient, cache):
for oem in sysinfo.get('Oem', {}):
if oem in OEMMAP:
return OEMMAP[oem].get_handler(sysinfo, sysurl, webclient, cache)
for oem in sysinfo.get('Links', {}).get('OEM'):
for oem in sysinfo.get('Links', {}).get('OEM', []):
if oem in OEMMAP:
return OEMMAP[oem].get_handler(sysinfo, sysurl, webclient, cache)
return generic.OEMHandler(sysinfo, sysurl, webclient, cache)