← Back to team overview

canonical-ubuntu-qa team mailing list archive

[Merge] ~andersson123/autopkgtest-cloud:fix-indexed-packages into autopkgtest-cloud:master

 

Tim Andersson has proposed merging ~andersson123/autopkgtest-cloud:fix-indexed-packages 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/477490

Fix small traceback in indexed-packages
-- 
Your team Canonical's Ubuntu QA is requested to review the proposed merge of ~andersson123/autopkgtest-cloud:fix-indexed-packages into autopkgtest-cloud:master.
diff --git a/charms/focal/autopkgtest-web/webcontrol/indexed-packages b/charms/focal/autopkgtest-web/webcontrol/indexed-packages
index 114d6d8..d92a034 100755
--- a/charms/focal/autopkgtest-web/webcontrol/indexed-packages
+++ b/charms/focal/autopkgtest-web/webcontrol/indexed-packages
@@ -15,7 +15,7 @@ def srchash(src):
 
 if __name__ == "__main__":
     cp = get_autopkgtest_cloud_conf()
-    indexed_packages = cp["web"]["indexed_packages"]
+    indexed_packages_fp = cp["web"]["indexed_packages"]
 
     db_con = sqlite3.connect(
         "file:%s?mode=ro" % cp["web"]["database_ro"],
@@ -33,5 +33,5 @@ if __name__ == "__main__":
         # strip off epoch
         v = row[1][row[1].find(":") + 1 :]
         indexed_packages.setdefault(srchash(row[0]), []).append((row[0], v))
-    with open(indexed_packages, "w") as f:
+    with open(indexed_packages_fp, "w") as f:
         json.dump(indexed_packages, f)