From 6054b08485a84de498d7ae2b680b1c968f8104b7 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Sun, 22 Jan 2023 19:20:39 +0100 Subject: fixup! now we've got the whole flow, need to beautify the thing --- app.py | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'app.py') 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("////") 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: -- cgit v1.2.3