canonical-ubuntu-qa team mailing list archive
-
canonical-ubuntu-qa team
-
Mailing list archive
-
Message #01094
[Merge] ~andersson123/autopkgtest-cloud:fix_traceback into autopkgtest-cloud:master
Tim Andersson has proposed merging ~andersson123/autopkgtest-cloud:fix_traceback 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/447886
--
Your team Canonical's Ubuntu QA is requested to review the proposed merge of ~andersson123/autopkgtest-cloud:fix_traceback into autopkgtest-cloud:master.
diff --git a/charms/focal/autopkgtest-web/webcontrol/request/submit.py b/charms/focal/autopkgtest-web/webcontrol/request/submit.py
index 1e31008..2be5749 100644
--- a/charms/focal/autopkgtest-web/webcontrol/request/submit.py
+++ b/charms/focal/autopkgtest-web/webcontrol/request/submit.py
@@ -590,10 +590,9 @@ class Submit:
for req in packages["requests"]:
pkg = req[: req.find("{")].rstrip()
details = json.loads(req[req.find("{") :])
- try:
- triggers = details["triggers"]
- except KeyError:
- triggers = []
+ if "triggers" not in details.keys():
+ return False
+ triggers = details["triggers"]
test = {
"release": release,
"arch": arch,
Follow ups