Skip to content
Snippets Groups Projects
Commit 82b9e246 authored by Ben Morrice's avatar Ben Morrice
Browse files

Don't hardcode the arch in the cset url, get it from the feed

parent a3b9b762
No related branches found
No related tags found
1 merge request!7Add support for RHEL "feeds", removing CentOS
Pipeline #6196644 waiting for manual action
...@@ -128,8 +128,9 @@ def call_api(token, url, params=None, stream=False): ...@@ -128,8 +128,9 @@ def call_api(token, url, params=None, stream=False):
def get_upstream(token, feed): def get_upstream(token, feed):
"""retrieve full list of packages from a cset""" """retrieve full list of packages from a cset"""
arch = re.match(r"(\w+-[0-9]-\w+-)(\w+)(-\w+-\w+)", line).group(2)
url = ( url = (
f"https://api.access.redhat.com/management/v1/packages/cset/{feed}/arch/x86_64" f"https://api.access.redhat.com/management/v1/packages/cset/{feed}/arch/{arch}"
) )
offset = 0 offset = 0
packages = [] packages = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment