diff --git a/fulfil_client/serialization.py b/fulfil_client/serialization.py index 9a1f41d..5c97151 100644 --- a/fulfil_client/serialization.py +++ b/fulfil_client/serialization.py @@ -53,7 +53,7 @@ def __call__(self, dct): def _bytes_decoder(dct): cast = bytearray if bytes == str else bytes - return cast(base64.decodestring(dct['base64'].encode('utf-8'))) + return cast(base64.b64decode(dct['base64'].encode('utf-8'))) JSONDecoder.register('bytes', _bytes_decoder)