mirror of
https://opendev.org/x/pyghmi
synced 2025-01-14 11:48:33 +00:00
Handle firmware upload error 413
If software attempts to upload a file larger than the XCC supports. Report a more understandable condition in such a case. Change-Id: I8b5a80c0be8fbca141bdce34d5da39095217b30b
This commit is contained in:
parent
7a195ddc2e
commit
a1364d55a0
@ -1455,6 +1455,8 @@ class XCCClient(IMMClient):
|
||||
progress({'phase': 'upload',
|
||||
'progress': 100.0 * rsp['received'] / rsp['size']})
|
||||
elif rsp['state'] != 'done':
|
||||
if rsp.get('status', None) == 413:
|
||||
raise Exception('File is larger than supported')
|
||||
raise Exception('Unexpected result:' + repr(rsp))
|
||||
uploadstate = rsp['state']
|
||||
self._refresh_token()
|
||||
|
Loading…
x
Reference in New Issue
Block a user