1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-13 17:16:23 +01:00

- do_maintainer(): support multiple --role <foo> options

This commit is contained in:
Marcus Huewe 2009-12-25 17:31:13 +01:00
parent 9e892b9e58
commit b3c8cc9062

View File

@ -3984,7 +3984,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
help='add a new maintainer')
@cmdln.option('-d', '--delete', metavar='user',
help='delete a maintainer from a project or package')
@cmdln.option('-r', '--role', metavar='role',
@cmdln.option('-r', '--role', metavar='role', action='append', default=[],
help='Specify user role')
def do_maintainer(self, subcmd, opts, *args):
"""${cmd_name}: Show maintainers of a project/package
@ -4002,8 +4002,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
pac = None
tree = None
roles = [ 'bugowner', 'maintainer' ]
if opts.role:
roles = [opts.role]
if len(opts.role):
roles = opts.role
if opts.bugowner_only or opts.bugowner:
roles = [ 'bugowner' ]