From 11a3b1561a07b28a37ac22637f636c4c5ac24c23 Mon Sep 17 00:00:00 2001 From: Sergey Zhuravlev Date: Wed, 12 Feb 2014 23:09:23 +0400 Subject: fixed support of python3 --- msgpack/fallback.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'msgpack/fallback.py') diff --git a/msgpack/fallback.py b/msgpack/fallback.py index 3ef1341..b673222 100644 --- a/msgpack/fallback.py +++ b/msgpack/fallback.py @@ -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 = str(next_bytes) + next_bytes = (bytes if PY3 else 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