2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-27 19:37:44 +00:00

Provide better error on XCC 109

The 109 error code means the file was not
recognized, which can mean the file is incorrect
or that the update provided is not one that
supports remote update.

Change-Id: I4437916b5812b9cb0dfb9e92460a2f8a7c850849
This commit is contained in:
Jarrod Johnson 2019-12-03 11:38:10 -05:00
parent 6a9f5ea6cc
commit d34945846e
2 changed files with 4 additions and 0 deletions

View File

@ -1665,6 +1665,8 @@ class XCCClient(IMMClient):
raise Exception('Update image not intended for this system')
elif rsp.get('return', -1) == 108:
raise Exception('Temporary error validating update, try again')
elif rsp.get('return', -1) == 109:
raise Exception('Invalid update file or component does not support remote update')
elif rsp.get('return', -1) != 0:
errmsg = repr(rsp) if rsp else self.wc.lastjsonerror
raise Exception('Unexpected return to verify: ' + errmsg)

View File

@ -565,6 +565,8 @@ class OEMHandler(generic.OEMHandler):
raise Exception('Update image not intended for this system')
elif rsp.get('return', -1) == 108:
raise Exception('Temporary error validating update, try again')
elif rsp.get('return', -1) == 109:
raise Exception('Invalid update file or component does not support remote update')
elif rsp.get('return', -1) != 0:
errmsg = repr(rsp) if rsp else self.wc.lastjsonerror
raise Exception('Unexpected return to verify: ' + errmsg)