diff options
| author | Olivier Gayot <olivier.gayot@sigexec.com> | 2023-01-22 19:20:39 +0100 | 
|---|---|---|
| committer | Olivier Gayot <olivier.gayot@sigexec.com> | 2023-01-22 19:25:58 +0100 | 
| commit | 6054b08485a84de498d7ae2b680b1c968f8104b7 (patch) | |
| tree | 152d3fe2e0916ead490e5eacc9e41b2ae951ffc8 | |
| parent | 83bb94c85a85e42b658bb3e9cc21def2b08c5aff (diff) | |
fixup! now we've got the whole flow, need to beautify the thing
| -rw-r--r-- | app.py | 14 | 
1 files changed, 0 insertions, 14 deletions
| @@ -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: | 
