From: Christopher Allan Webber Date: Thu, 11 Feb 2016 22:47:04 +0000 (-0800) Subject: Fix another python 3 and unicode issue X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=fa9c0576bafa6e8d282e3220bac80a4087f557e0;p=mediagoblin.git Fix another python 3 and unicode issue --- 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: