wire: convert to bytearray every time

This commit is contained in:
Jan Pochyla 2016-11-15 18:55:32 +01:00
parent 90c4480bf6
commit 02d615ff06
1 changed files with 1 additions and 2 deletions

View File

@ -116,7 +116,6 @@ Pass report payloads as `memoryview` for cheaper slicing.
if len(msg_footer) < _MSG_FOOTER_LEN:
data_tail = yield # read report with the rest of checksum
footer_tail = data_tail[:_MSG_FOOTER_LEN - len(msg_footer)]
if isinstance(msg_footer, memoryview):
msg_footer = bytearray(msg_footer)
msg_footer.extend(footer_tail)