Skip to content

Commit

Permalink
Migrate core.get_repos_of_project() to obs_api.Project
Browse files Browse the repository at this point in the history
  • Loading branch information
dmach committed Feb 23, 2024
1 parent 0b1f98a commit 537dca3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions osc/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -6481,13 +6481,13 @@ def tofile(filename, repos):
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(
Expand Down

0 comments on commit 537dca3

Please sign in to comment.