Tim Andersson has proposed merging ~andersson123/autopkgtest-cloud:fix-cache-amqp-creds 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/465238 -- Your team Canonical's Ubuntu QA is requested to review the proposed merge of ~andersson123/autopkgtest-cloud:fix-cache-amqp-creds into autopkgtest-cloud:master.
diff --git a/charms/focal/autopkgtest-web/webcontrol/cache-amqp b/charms/focal/autopkgtest-web/webcontrol/cache-amqp index adfd4df..336891e 100755 --- a/charms/focal/autopkgtest-web/webcontrol/cache-amqp +++ b/charms/focal/autopkgtest-web/webcontrol/cache-amqp @@ -4,6 +4,7 @@ import argparse import json import logging import os +import re import sqlite3 import sys import tempfile @@ -123,11 +124,8 @@ class AutopkgtestQueueContents: if isinstance(r, bytes): r = r.decode("UTF-8") try: - req = r.split("\n", 1) - if len(req) > 1: - params = json.loads(req[1]) - else: - params = {} + req = re.search(r"{(.*)}", r).group(1) + params = json.loads("{%s}" % req) if params.get("readable-by", False) or params.get( "swiftuser", False ):
-- Mailing list: https://launchpad.net/~canonical-ubuntu-qa Post to : canonical-ubuntu-qa@lists.launchpad.net Unsubscribe : https://launchpad.net/~canonical-ubuntu-qa More help : https://help.launchpad.net/ListHelp