mirror of
https://opendev.org/x/pyghmi
synced 2025-07-16 17:21:14 +00:00
Tolerate alternative return code for FRU size
202 means 'Cannot return number of request bytes', which is pretty on the nose for the scenario at hand. Include that in the conditions to reduce the request size. Thanks to Rafael Debarros for this. Change-Id: I833faf2559a93e468748a72db29e6967bc800207
This commit is contained in:
@@ -160,7 +160,7 @@ class FRU(object):
|
||||
response = self.ipmicmd.raw_command(
|
||||
netfn=0xa, command=0x11, data=[fruid, offset & 0xff,
|
||||
offset >> 8, chunksize])
|
||||
if response['code'] == 201:
|
||||
if response['code'] in (201, 202):
|
||||
# if it was too big, back off and try smaller
|
||||
# Try just over half to mitigate the chance of
|
||||
# one request becoming three rather than just two
|
||||
|
Reference in New Issue
Block a user