From 48ca2d700d019bfec9abe3242a8eb3073c803951 Mon Sep 17 00:00:00 2001 From: Sergey Zhuravlev Date: Sun, 15 Dec 2013 16:22:39 +0000 Subject: Added support of bytearrays to msgpack/fallback.py --- msgpack/fallback.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'msgpack/fallback.py') diff --git a/msgpack/fallback.py b/msgpack/fallback.py index bf5b1c2..3ef1341 100644 --- a/msgpack/fallback.py +++ b/msgpack/fallback.py @@ -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 = str(next_bytes) assert self._fb_feeding if self._fb_buf_n + len(next_bytes) > self._max_buffer_size: raise BufferFull -- cgit v1.2.1