summaryrefslogtreecommitdiff
path: root/app.py
diff options
context:
space:
mode:
authorOlivier Gayot <olivier.gayot@sigexec.com>2023-01-22 19:20:39 +0100
committerOlivier Gayot <olivier.gayot@sigexec.com>2023-01-22 19:25:58 +0100
commit6054b08485a84de498d7ae2b680b1c968f8104b7 (patch)
tree152d3fe2e0916ead490e5eacc9e41b2ae951ffc8 /app.py
parent83bb94c85a85e42b658bb3e9cc21def2b08c5aff (diff)
fixup! now we've got the whole flow, need to beautify the thing
Diffstat (limited to 'app.py')
-rw-r--r--app.py14
1 files changed, 0 insertions, 14 deletions
diff --git a/app.py b/app.py
index 4805101..e6d84b9 100644
--- a/app.py
+++ b/app.py
@@ -31,20 +31,7 @@ def index_lpuser(LPUSER):
def index_ppa(LPUSER, PPA):
lpuser = launchpad.people[LPUSER]
- runs = []
-
ppa = next(filter(lambda p: p.name == PPA, lpuser.ppas))
- series_set = set()
- for source_pkg in ppa.getPublishedSources():
- series_set.add(source_pkg.distro_series.name)
-
- for series in series_set:
- RELEASE = series
-
- try:
- urlopen(f"https://autopkgtest.ubuntu.com/results/autopkgtest-{RELEASE}-{LPUSER}-{PPA}/?format=json").read()
- except urllib.error.HTTPError:
- continue
return jsonify(list(set([pkg.source_package_name for pkg in ppa.getPublishedSources()])))
@@ -68,7 +55,6 @@ def index_package(LPUSER, PPA, PACKAGE):
@app.route("/<LPUSER>/<PPA>/<PACKAGE>/<RELEASE>")
def index_release(LPUSER, PPA, PACKAGE, RELEASE):
autopkgtest_url_base = f"https://autopkgtest.ubuntu.com/results/autopkgtest-{RELEASE}-{LPUSER}-{PPA}"
- data = json.loads(urlopen(f"{autopkgtest_url_base}?format=json").read())
try:
data = json.loads(urlopen(f"https://autopkgtest.ubuntu.com/results/autopkgtest-{RELEASE}-{LPUSER}-{PPA}/?format=json").read())
except urllib.error.HTTPError: