aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tools/request.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2016-02-11 14:47:04 -0800
committerChristopher Allan Webber <cwebber@dustycloud.org>2016-02-11 14:47:04 -0800
commitfa9c0576bafa6e8d282e3220bac80a4087f557e0 (patch)
tree01fd55017b64de8e57cfc7a7fadee569c6798c1a /mediagoblin/tools/request.py
parentcd4a7492cd2fd7ae332ecdaaec93a2bc3be9cf4e (diff)
downloadmediagoblin-fa9c0576bafa6e8d282e3220bac80a4087f557e0.tar.lz
mediagoblin-fa9c0576bafa6e8d282e3220bac80a4087f557e0.tar.xz
mediagoblin-fa9c0576bafa6e8d282e3220bac80a4087f557e0.zip
Fix another python 3 and unicode issue
Diffstat (limited to 'mediagoblin/tools/request.py')
-rw-r--r--mediagoblin/tools/request.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mediagoblin/tools/request.py b/mediagoblin/tools/request.py
index af06967b..7e1973d3 100644
--- a/mediagoblin/tools/request.py
+++ b/mediagoblin/tools/request.py
@@ -17,6 +17,7 @@
import json
import logging
+import six
from werkzeug.http import parse_options_header
from mediagoblin.db.models import User, AccessToken
@@ -65,7 +66,7 @@ def decode_request(request):
content_type, _ = parse_options_header(request.content_type)
if content_type == json_encoded:
- data = json.loads(data)
+ data = json.loads(six.text_type(data, "utf-8"))
elif content_type == form_encoded or content_type == "":
data = request.form
else: