Skip to content

Commit

Permalink
Fix for Python 3.5, refs #435
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Apr 21, 2019
1 parent 9d73e3c commit 11b352b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datasette/app.py
Expand Up @@ -738,7 +738,7 @@ async def add_traces_to_response(request, response):
extra_html = "<pre>{}</pre></body>".format(extra).encode("utf8")
response.body = response.body.replace(b"</body>", extra_html)
elif "json" in response.content_type and response.body.startswith(b"{"):
data = json.loads(response.body)
data = json.loads(response.body.decode("utf8"))
if "_traces" not in data:
data["_traces"] = {
"num_traces": len(traces),
Expand Down

0 comments on commit 11b352b

Please sign in to comment.