From 7002c1e8f31d61199346b4da2d403a3991d7e3c2 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 10 Jan 2019 13:14:53 -0500 Subject: [PATCH] Refresh token during validation XCC may take a while validating, and the token must be refreshed to avoid chance of expiry. Change-Id: I0e78008dba6bc214876ca286989b01d2f89733bb --- pyghmi/ipmi/oem/lenovo/imm.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyghmi/ipmi/oem/lenovo/imm.py b/pyghmi/ipmi/oem/lenovo/imm.py index fd366fb5..90763852 100644 --- a/pyghmi/ipmi/oem/lenovo/imm.py +++ b/pyghmi/ipmi/oem/lenovo/imm.py @@ -1469,6 +1469,7 @@ class XCCClient(IMMClient): raise Exception('Unexpected return to verify: ' + repr(rsp)) verifystatus = 0 while verifystatus != 1: + self._refresh_token() rsp = self.wc.grab_json_response( '/api/providers/fwupdate', json.dumps({'UPD_WebVerifyUploadFileStatus': 1}))