← Back to team overview

canonical-ubuntu-qa team mailing list archive

[Merge] ~andersson123/autopkgtest-cloud:pretty-print-queues-json into autopkgtest-cloud:master

 

Tim Andersson has proposed merging ~andersson123/autopkgtest-cloud:pretty-print-queues-json into autopkgtest-cloud:master.

Requested reviews:
  Canonical's Ubuntu QA (canonical-ubuntu-qa)

For more details, see:
https://code.launchpad.net/~andersson123/autopkgtest-cloud/+git/autopkgtest-cloud/+merge/456591
-- 
Your team Canonical's Ubuntu QA is requested to review the proposed merge of ~andersson123/autopkgtest-cloud:pretty-print-queues-json into autopkgtest-cloud:master.
diff --git a/charms/focal/autopkgtest-web/webcontrol/browse.cgi b/charms/focal/autopkgtest-web/webcontrol/browse.cgi
index d7bc343..9a67ea2 100755
--- a/charms/focal/autopkgtest-web/webcontrol/browse.cgi
+++ b/charms/focal/autopkgtest-web/webcontrol/browse.cgi
@@ -380,7 +380,9 @@ def queuesize_json():
                 # pylint: disable=unused-variable
                 (queue_size, queue_items) = queue_info[context][release][arch]
                 queue_info[context][release][arch] = len(queue_items)
-    return json.dumps(queue_info, indent=2)
+    return flask.Response(
+        json.dumps(queue_info, indent=2), mimetype="application/json"
+    )
 
 
 @app.route("/queues.json")