mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-03 21:36:15 +01:00
Change 'token --create' command to require '--operation'
This commit is contained in:
parent
de26a24f68
commit
d0d25ff5de
@ -1673,7 +1673,7 @@ class Osc(cmdln.Cmdln):
|
|||||||
|
|
||||||
usage:
|
usage:
|
||||||
osc token
|
osc token
|
||||||
osc token --create [--operation <OPERATION>] [<PROJECT> <PACKAGE>]
|
osc token --create --operation <OPERATION> [<PROJECT> <PACKAGE>]
|
||||||
osc token --delete <TOKENID>
|
osc token --delete <TOKENID>
|
||||||
osc token --trigger <TOKENSTRING> [--operation <OPERATION>] [<PROJECT> <PACKAGE>]
|
osc token --trigger <TOKENSTRING> [--operation <OPERATION>] [<PROJECT> <PACKAGE>]
|
||||||
"""
|
"""
|
||||||
@ -1688,6 +1688,8 @@ class Osc(cmdln.Cmdln):
|
|||||||
url_path = ['person', conf.get_apiurl_usr(apiurl), 'token']
|
url_path = ['person', conf.get_apiurl_usr(apiurl), 'token']
|
||||||
|
|
||||||
if opts.create:
|
if opts.create:
|
||||||
|
if not opts.operation:
|
||||||
|
self.argparser.error("Please specify --operation")
|
||||||
if opts.operation == 'workflow' and not opts.scm_token:
|
if opts.operation == 'workflow' and not opts.scm_token:
|
||||||
msg = 'The --operation=workflow option requires a --scm-token=<token> option'
|
msg = 'The --operation=workflow option requires a --scm-token=<token> option'
|
||||||
raise oscerr.WrongOptions(msg)
|
raise oscerr.WrongOptions(msg)
|
||||||
|
Loading…
Reference in New Issue
Block a user