From fa9c0576bafa6e8d282e3220bac80a4087f557e0 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Thu, 11 Feb 2016 14:47:04 -0800 Subject: [PATCH] Fix another python 3 and unicode issue --- mediagoblin/tools/request.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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: -- 2.25.1