mirror of
https://opendev.org/x/pyghmi
synced 2025-01-15 12:17:44 +00:00
Break out of FRU read if zero data returned
If a BMC returns 0 data, then assume end of data has been reached. Not all implementations accurately advertise FRU size, so this is a way to detect and break out. Change-Id: I03d0393563f8527e16830098b649ae940ee7ee9e
This commit is contained in:
parent
8c8ce504c1
commit
c28ff05b1e
@ -172,6 +172,8 @@ class FRU(object):
|
||||
raise iexc.IpmiException(response['error'], response['code'])
|
||||
self.rawfru.extend(response['data'][1:])
|
||||
offset += response['data'][0]
|
||||
if response['data'][0] == 0:
|
||||
break
|
||||
if offset + chunksize > frusize:
|
||||
chunksize = frusize - offset
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user