osclib/core: provide meta_role_expand() to expand a role to users given meta.
This commit is contained in:
parent
3a444c253e
commit
0ee408a716
@ -83,6 +83,14 @@ def maintainers_get(apiurl, project, package=None):
|
||||
|
||||
return maintainers
|
||||
|
||||
def meta_role_expand(apiurl, meta, role='maintainer'):
|
||||
users = meta.xpath('//person[@role="{}"]/@userid'.format(role))
|
||||
|
||||
groups = meta.xpath('//group[@role="{}"]/@groupid'.format(role))
|
||||
users.extend(groups_members(apiurl, groups))
|
||||
|
||||
return users
|
||||
|
||||
def package_list(apiurl, project):
|
||||
url = makeurl(apiurl, ['source', project], { 'expand': 1 })
|
||||
root = ET.parse(http_GET(url)).getroot()
|
||||
|
Loading…
x
Reference in New Issue
Block a user