mirror of
https://github.com/openSUSE/osc.git
synced 2025-03-01 05:32:13 +01:00
Migrate core.get_repositories_of_project() to obs_api.Project
This commit is contained in:
parent
d017a490a0
commit
0b1f98acb3
@ -6440,11 +6440,10 @@ def get_platforms_of_project(apiurl: str, prj: str):
|
||||
|
||||
|
||||
def get_repositories_of_project(apiurl: str, prj: str):
|
||||
f = show_project_meta(apiurl, prj)
|
||||
root = ET.fromstring(b''.join(f))
|
||||
from . import obs_api
|
||||
|
||||
r = [node.get('name') for node in root.findall('repository')]
|
||||
return r
|
||||
project_obj = obs_api.Project.from_api(apiurl, prj)
|
||||
return [i.name for i in project_obj.repository_list or []]
|
||||
|
||||
|
||||
class Repo:
|
||||
|
Loading…
x
Reference in New Issue
Block a user