Be compatible with wheezy python

Debian wheezy has a python vintage that
errors on unpack from a bytearray.
Explicitly cast to bytes for unpack
to compensate.

Change-Id: Icaf3931a905102e6ee6ef03d91617c031a1afc86
This commit is contained in:
Jarrod Johnson
2019-02-08 14:31:54 -05:00
parent 3e65ed0189
commit 90a9be1344
2 changed files with 26 additions and 30 deletions

View File

@@ -672,7 +672,7 @@ class SDR(object):
# NOTE(jbjohnso): not looking to support the various options in op
# support, ignore those for now, reservation if some BMCs can't read
# full SDR in one slurp
modtime = struct.unpack('!Q', repinfo['data'][5:13])[0]
modtime = struct.unpack('!Q', bytes(repinfo['data'][5:13]))[0]
recid = 0
rsvid = 0 # partial 'get sdr' will require this
offset = 0