kopia lustrzana https://github.com/simonw/datasette
Fix for Python 3.5, refs #435
rodzic
9d73e3c8bd
commit
11b352b4d5
|
@ -738,7 +738,7 @@ class Datasette:
|
||||||
extra_html = "<pre>{}</pre></body>".format(extra).encode("utf8")
|
extra_html = "<pre>{}</pre></body>".format(extra).encode("utf8")
|
||||||
response.body = response.body.replace(b"</body>", extra_html)
|
response.body = response.body.replace(b"</body>", extra_html)
|
||||||
elif "json" in response.content_type and response.body.startswith(b"{"):
|
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:
|
if "_traces" not in data:
|
||||||
data["_traces"] = {
|
data["_traces"] = {
|
||||||
"num_traces": len(traces),
|
"num_traces": len(traces),
|
||||||
|
|
Ładowanie…
Reference in New Issue