Merge branch 'pr/82'

This commit is contained in:
INADA Naoki 2014-02-17 04:07:16 +09:00
commit eb3537ab50
2 changed files with 11 additions and 1 deletions

View file

@ -193,6 +193,8 @@ class Unpacker(object):
def feed(self, next_bytes):
if isinstance(next_bytes, array.array):
next_bytes = next_bytes.tostring()
elif isinstance(next_bytes, bytearray):
next_bytes = bytes(next_bytes)
assert self._fb_feeding
if self._fb_buf_n + len(next_bytes) > self._max_buffer_size:
raise BufferFull