Use (un)hexlify for Field 4007. Fixes #13. Recipes need to be dumped again.
This commit is contained in:
parent
4756c17dde
commit
0582ddce4b
@ -354,7 +354,10 @@ class TLV7(TLV):
|
|||||||
continue
|
continue
|
||||||
elif k[0:2] != "0x":
|
elif k[0:2] != "0x":
|
||||||
continue
|
continue
|
||||||
numval = int(v, 0)
|
if v[0:2] == "0x":
|
||||||
|
numval = int(v, 0)
|
||||||
|
else:
|
||||||
|
numval = unhexlify(v)
|
||||||
new_values.append(numval)
|
new_values.append(numval)
|
||||||
if not self.tlv6.is_parsed:
|
if not self.tlv6.is_parsed:
|
||||||
# Make sure we have the structure analysed (need format attr)
|
# Make sure we have the structure analysed (need format attr)
|
||||||
@ -386,7 +389,7 @@ class TLVbinary(TLV):
|
|||||||
elif valtype == "Q":
|
elif valtype == "Q":
|
||||||
valstr = "0x{:08x}".format(v)
|
valstr = "0x{:08x}".format(v)
|
||||||
elif valtype == "31s":
|
elif valtype == "31s":
|
||||||
valstr = repr(v)
|
valstr = hexlify(v).decode("utf-8")
|
||||||
else:
|
else:
|
||||||
valstr = "0x{:08x}".format(v)
|
valstr = "0x{:08x}".format(v)
|
||||||
data.append(("0x{:04x}".format(fid), valstr, fdesc))
|
data.append(("0x{:04x}".format(fid), valstr, fdesc))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user