Change unicode() --> six.text_type() for Python 3

This commit is contained in:
cclauss
2018-02-08 22:04:08 +01:00
parent 7e42c54868
commit 2e623ad80c
16 changed files with 68 additions and 48 deletions

View File

@@ -72,7 +72,7 @@ class PlainTextRenderer(renderers.BaseRenderer):
def render(self, data, media_type=None, renderer_context=None):
if not isinstance(data, six.string_types):
data = unicode(data)
data = six.text_type(data)
return data.encode(self.charset)