This commit is contained in:
INADA Naoki 2014-02-17 04:05:04 +09:00
parent 11a3b1561a
commit 7effb4aac6

View file

@ -194,7 +194,7 @@ class Unpacker(object):
if isinstance(next_bytes, array.array):
next_bytes = next_bytes.tostring()
elif isinstance(next_bytes, bytearray):
next_bytes = (bytes if PY3 else str)(next_bytes)
next_bytes = bytes(next_bytes)
assert self._fb_feeding
if self._fb_buf_n + len(next_bytes) > self._max_buffer_size:
raise BufferFull