mirror of
https://github.com/mon/kbinxml.git
synced 2026-03-21 18:04:52 -05:00
Fix python2 (again)
This commit is contained in:
parent
50fa4b8d23
commit
dccacdb6e6
|
|
@ -22,6 +22,6 @@ def unpack_sixbit(byteBuf):
|
|||
length_bytes = (length_bits + 7) // 8
|
||||
bitBuf = bitarray(endian='big')
|
||||
bitBuf.frombytes(bytes(byteBuf.get_bytes(length_bytes)))
|
||||
result = [bitBuf[offset:offset+6].tobytes()[0] >> 2
|
||||
result = [bytes(bitBuf[offset:offset+6].tobytes())[0] >> 2
|
||||
for offset in range(0, length_bits, 6)]
|
||||
return ''.join([charmap[x] for x in result])
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user