supporting python 3

This commit is contained in:
Jack Danger 2017-10-02 15:25:02 -07:00
parent 867fc3b7f7
commit 95a4bd5a7b

View File

@ -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()