decode to unicode before loading in json again, for py3
authorChristopher Allan Webber <cwebber@dustycloud.org>
Tue, 16 Sep 2014 20:33:46 +0000 (15:33 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Tue, 16 Sep 2014 20:33:46 +0000 (15:33 -0500)
This commit sponsored by Chris Cormack.  Thanks!

mediagoblin/federation/views.py

index 3d6953a7c3642f124c2cd0c4013923b40e6a5a5b..cff33224fa35722e87948cfd093b74ed138dd525 100644 (file)
@@ -139,7 +139,7 @@ def feed_endpoint(request):
         return json_error("No such 'user' with id '{0}'".format(username), 404)
 
     if request.data:
-        data = json.loads(request.data)
+        data = json.loads(request.data.decode())
     else:
         data = {"verb": None, "object": {}}