mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-28 23:46:13 +01:00
Migrate core.get_repos_of_project() to obs_api.Project
This commit is contained in:
parent
0b1f98acb3
commit
537dca3c7f
12
osc/core.py
12
osc/core.py
@ -6481,13 +6481,13 @@ class Repo:
|
||||
f.write(f'{repo.name} {repo.arch}\n')
|
||||
|
||||
|
||||
def get_repos_of_project(apiurl, prj):
|
||||
f = show_project_meta(apiurl, prj)
|
||||
root = ET.fromstring(b''.join(f))
|
||||
def get_repos_of_project(apiurl: str, prj: str):
|
||||
from . import obs_api
|
||||
|
||||
for node in root.findall('repository'):
|
||||
for node2 in node.findall('arch'):
|
||||
yield Repo(node.get('name'), node2.text)
|
||||
project_obj = obs_api.Project.from_api(apiurl, prj)
|
||||
for repo in project_obj.repository_list or []:
|
||||
for arch in repo.arch_list:
|
||||
yield Repo(repo.name, arch)
|
||||
|
||||
|
||||
def get_binarylist(
|
||||
|
Loading…
Reference in New Issue
Block a user