mirror of
https://opendev.org/x/pyghmi
synced 2025-01-15 04:07:48 +00:00
Fix concurrent firmware updates
If another instance deletes the form, it's ok. Ignore the exception and continue on. Change-Id: I3c92e5c657d6b16daa70f26dd450e3b9c6e55a11
This commit is contained in:
parent
6b3694f01a
commit
fcdfdd763c
@ -563,7 +563,7 @@ class XCCClient(IMMClient):
|
||||
raise Exception('Unexpected response: ' + repr(rsp))
|
||||
progress({'phase': 'upload',
|
||||
'progress': 100.0})
|
||||
ipmisession.Session.pause(2)
|
||||
ipmisession.Session.pause(3)
|
||||
# aggressive timing can cause the next call to occasionally
|
||||
# return 25 and fail
|
||||
self._refresh_token()
|
||||
|
@ -128,7 +128,10 @@ class SecureHTTPConnection(httplib.HTTPConnection, object):
|
||||
# peer updates in progress should already have pointers,
|
||||
# subsequent transactions will cause memory to needlessly double,
|
||||
# but easiest way to keep memory relatively low
|
||||
del uploadforms[filename]
|
||||
try:
|
||||
del uploadforms[filename]
|
||||
except KeyError: # something could have already deleted it
|
||||
pass
|
||||
if rsp.status != 200:
|
||||
raise Exception('Unexpected response in file upload: ' +
|
||||
rsp.read())
|
||||
|
Loading…
x
Reference in New Issue
Block a user