2
0
mirror of https://opendev.org/x/pyghmi synced 2026-01-11 02:32:31 +00:00

Merge "Fix Python2 compat in new SDR cache code"

This commit is contained in:
Zuul
2022-03-01 13:32:42 +00:00
committed by Gerrit Code Review

View File

@@ -841,6 +841,8 @@ class SDR(object):
False, self.mfg_id, self.prod_id)
def add_sdr(self, sdrbytes):
if not isinstance(sdrbytes[0], int):
sdrbytes = bytearray(sdrbytes)
newent = self.make_sdr_entry(sdrbytes)
if newent.sdrtype == TYPE_SENSOR:
id = '{0}.{1}.{2}'.format(