From e9e49c5916012c2bca75aeee38ee7a8a29349c79 Mon Sep 17 00:00:00 2001 From: Steve Pulec Date: Wed, 15 Mar 2017 22:12:16 -0400 Subject: [PATCH] Fix py3 redshift encoding. --- CHANGELOG.md | 1 + moto/redshift/responses.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5938acbb6..ebf621dd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ Latest * The normal @mock_ decorators will no longer work with boto. It is suggested that you upgrade to boto3 or use the standalone-server mode. If you would still like to use boto, you must use the @mock__deprecated decorators which will be removed in a future release. * The @mock_s3bucket_path decorator is now deprecated. Use the @mock_s3 decorator instead. * Drop support for Python 2.6 + * Redshift server defaults to returning XML instead of JSON Added * Reset API: a reset API has been added to flush all of the current data ex: `requests.post("http://motoapi.amazonaws.com/moto-api/reset")` diff --git a/moto/redshift/responses.py b/moto/redshift/responses.py index cc0e72793..ba28b1343 100644 --- a/moto/redshift/responses.py +++ b/moto/redshift/responses.py @@ -18,7 +18,7 @@ class RedshiftResponse(BaseResponse): return json.dumps(response) else: xml = dicttoxml.dicttoxml(response, attr_type=False, root=False) - return xml + return xml.decode("utf-8") def create_cluster(self): cluster_kwargs = {