From 95a4bd5a7b4d73de8efcc2834b5543a3baef26cc Mon Sep 17 00:00:00 2001 From: Jack Danger Date: Mon, 2 Oct 2017 15:25:02 -0700 Subject: [PATCH] supporting python 3 --- moto/redshift/responses.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/moto/redshift/responses.py b/moto/redshift/responses.py index 58983310..a320f9ca 100644 --- a/moto/redshift/responses.py +++ b/moto/redshift/responses.py @@ -56,7 +56,9 @@ class RedshiftResponse(BaseResponse): return json.dumps(response) else: xml = xmltodict.unparse(itemize(response), full_document=False) - return xml.decode("utf-8") + if hasattr(xml, 'decode'): + xml = xml.decode('utf-8') + return xml def call_action(self): status, headers, body = super(RedshiftResponse, self).call_action()