From 6d89fee500ba29fffd9385903ffd1cbb4886c866 Mon Sep 17 00:00:00 2001 From: Marcus Huewe Date: Wed, 24 Nov 2010 16:41:02 +0100 Subject: [PATCH] - do_requestmaintainership: added --role option to allow different roles ('bugowner' or 'maintainer') (slightly modified version of Anas Nashif's patch) --- osc/commandline.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/osc/commandline.py b/osc/commandline.py index ab4b332b..31a1f429 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -1356,6 +1356,8 @@ Please submit there instead, or use --nodevelproject to force direct submission. @cmdln.option('-m', '--message', metavar='TEXT', help='specify message TEXT') + @cmdln.option('-r', '--role', metavar='role', default='maintainer', + help='specify user role (default: maintainer)') @cmdln.alias("reqmaintainership") @cmdln.alias("reqms") def do_requestmaintainership(self, subcmd, opts, *args): @@ -1393,7 +1395,10 @@ Please submit there instead, or use --nodevelproject to force direct submission. else: raise oscerr.WrongArgs('Wrong number of arguments.') - arg = [ user, 'maintainer', project, package ] + if not opts.role in ('maintainer', 'bugowner'): + raise oscerr.WrongOptions('invalid \'--role\': either specify \'maintainer\' or \'bugowner\'') + + arg = [ user, opts.role, project, package ] actionsxml = self._add_role(arg, None)