From ebf33d40bf99bdd915c9ba60ce0800fdac080474 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 14 Dec 2018 08:07:30 -0500 Subject: [PATCH] Restore support for old XCC update API Oldest XCCs return different data to unsupported APIs, so modify to support three variants, no return, return 2, and the latest that require support for the return code. Change-Id: I8d04cfffa42ff9b70bd4a19e32b353c0c7be5544 --- pyghmi/ipmi/oem/lenovo/imm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyghmi/ipmi/oem/lenovo/imm.py b/pyghmi/ipmi/oem/lenovo/imm.py index 43af277c..641804d5 100644 --- a/pyghmi/ipmi/oem/lenovo/imm.py +++ b/pyghmi/ipmi/oem/lenovo/imm.py @@ -1444,7 +1444,7 @@ class XCCClient(IMMClient): rsp = self.wc.grab_json_response( '/api/providers/fwupdate', json.dumps({'UPD_WebVerifyUploadFileStatus': 1})) - if rsp['return'] == 2: + if not rsp or rsp['return'] == 2: # The XCC firmware predates the FileStatus api break if rsp['return'] != 0: