diff --git a/osc/commandline.py b/osc/commandline.py index f488794e..7ef47be4 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -1673,7 +1673,7 @@ class Osc(cmdln.Cmdln): usage: osc token - osc token --create [--operation ] [ ] + osc token --create --operation [ ] osc token --delete osc token --trigger [--operation ] [ ] """ @@ -1688,6 +1688,8 @@ class Osc(cmdln.Cmdln): url_path = ['person', conf.get_apiurl_usr(apiurl), 'token'] if opts.create: + if not opts.operation: + self.argparser.error("Please specify --operation") if opts.operation == 'workflow' and not opts.scm_token: msg = 'The --operation=workflow option requires a --scm-token= option' raise oscerr.WrongOptions(msg)