fix: improve error message when user passes in only api and url
Also change enable to enabled. Before if a user passed in --api and --url TEXT the error message would return a confusing message that the user must pass in url when api is enabled. Now the error message says the user must provide url and token when api is enabled. Change-Id: I3284a7e1f920217dc476abcdd1fc17701c85655e
This commit is contained in:
parent
46bb9bd8b3
commit
caa75e403e
@ -70,7 +70,7 @@ def main(ctx, debug, api, url, token):
|
||||
if api:
|
||||
if not url or not token:
|
||||
raise click.ClickException(
|
||||
'When api option is enable user needs to pass url')
|
||||
'When api option is enabled user needs to pass url and token')
|
||||
else:
|
||||
ctx.obj['api'] = api
|
||||
parsed_url = urlparse(url)
|
||||
|
Loading…
x
Reference in New Issue
Block a user