From 4665b98b2a58a5e55dc9189c8e8003fb5de335f5 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 13 Feb 2018 10:42:59 -0500 Subject: [PATCH] Do not declare 'complete' before the 'mount'. Do 100% upload, then do complete after the mount call. This avoids software erroneously stopping the upload/mount process. Change-Id: I72af325c9796ceab2ba257f3bed0e42d4814c28d --- pyghmi/ipmi/oem/lenovo/imm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyghmi/ipmi/oem/lenovo/imm.py b/pyghmi/ipmi/oem/lenovo/imm.py index 35144933..190d14b1 100644 --- a/pyghmi/ipmi/oem/lenovo/imm.py +++ b/pyghmi/ipmi/oem/lenovo/imm.py @@ -1014,7 +1014,8 @@ class XCCClient(IMMClient): self._refresh_token() rsp = json.loads(uploadthread.rsp) if progress: - progress({'phase': 'complete'}) + progress({'phase': 'upload', + 'progress': 100.0}) thepath = rsp['items'][0]['path'] thename = rsp['items'][0]['name'] writeable = 1 if filename.lower().endswith('.img') else 0 @@ -1029,6 +1030,8 @@ class XCCClient(IMMClient): {}) if rsp['return'] != 0: raise Exception('Unrecognized return: ' + repr(rsp)) + if progress: + progress({'phase': 'complete'}) self.weblogout() def update_firmware(self, filename, data=None, progress=None, bank=None):