diff --git a/pyghmi/ipmi/oem/lenovo/imm.py b/pyghmi/ipmi/oem/lenovo/imm.py index dacea248..0daf70eb 100644 --- a/pyghmi/ipmi/oem/lenovo/imm.py +++ b/pyghmi/ipmi/oem/lenovo/imm.py @@ -1044,6 +1044,10 @@ class XCCClient(IMMClient): addfile) if rsp['return'] != 0: raise Exception('Unrecognized return: ' + repr(rsp)) + rsp = self.wc.grab_json_response('/api/providers/rp_rdoc_getfiles') + if 'items' not in rsp or len(rsp['items']) == 0: + raise Exception( + 'Image upload was not accepted, it may be too large') rsp = self.wc.grab_json_response('/api/providers/rp_rdoc_mountall', {}) if rsp['return'] != 0: