aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/response.py
diff options
context:
space:
mode:
Diffstat (limited to 'rest_framework/response.py')
-rw-r--r--rest_framework/response.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/rest_framework/response.py b/rest_framework/response.py
index 25b78524..80225cac 100644
--- a/rest_framework/response.py
+++ b/rest_framework/response.py
@@ -62,8 +62,10 @@ class Response(SimpleTemplateResponse):
ret = renderer.render(self.data, media_type, context)
if isinstance(ret, six.text_type):
- assert charset, 'renderer returned unicode, and did not specify ' \
- 'a charset value.'
+ assert charset, (
+ 'renderer returned unicode, and did not specify '
+ 'a charset value.'
+ )
return bytes(ret.encode(charset))
if not ret: