From c6520d56ffc7230034ba98f3d95479ad2210eee0 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 30 Jan 2023 15:00:26 -0500 Subject: [PATCH] Correct the Purley check for config In the ipmi path, provide a null dictionary to make the check viable, and stop assuming that an unknown system is always purley. Change-Id: I13f7a9f70d83e5679d90acb83e0df1522f441f41 --- pyghmi/ipmi/oem/lenovo/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyghmi/ipmi/oem/lenovo/config.py b/pyghmi/ipmi/oem/lenovo/config.py index 8b598517..30ed06d9 100644 --- a/pyghmi/ipmi/oem/lenovo/config.py +++ b/pyghmi/ipmi/oem/lenovo/config.py @@ -272,13 +272,13 @@ class LenovoFirmwareConfig(object): options = {} data = None if self.connection: - rsp = (None, 200) + rsp = ({}, 200) else: rsp = self.xc.grab_redfish_response_with_status( '/redfish/v1/Managers/1') if rsp[1] == 200: if 'purley' not in rsp[0].get('Oem', {}).get('Lenovo', {}).get( - 'release_name', 'purley'): + 'release_name', 'unknown'): rsp = self.xc.grab_redfish_response_with_status( '/redfish/v1/Systems/1/Actions/Oem/LenovoComputerSystem.DSReadFile', {'Action': 'DSReadFile', 'FileName': cfgfilename})