Commit ca7f1eac authored by Jason Chase's avatar Jason Chase Committed by Commit Bot

Improve usability for generate_token.py

Make |version| a named parameter instead of positional. This should
make command lines less error-prone and magical (i.e. "what's this 3 in
the middle of the command").

Change-Id: I7ac59fa0268c0015f99232a8d3e24a64dadee717
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2204627Reviewed-by: default avatarIan Clelland <iclelland@chromium.org>
Commit-Queue: Jason Chase <chasej@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771081}
parent 83c14c4e
......@@ -10,7 +10,8 @@ usage: generate_token.py [-h] [--key-file KEY_FILE]
--expire-timestamp EXPIRE_TIMESTAMP]
[--is_subdomain | --no-subdomain]
[--is_third-party | --no-third-party]
version origin trial_name
--version=VERSION
origin trial_name
Run "generate_token.py -h" for more help on usage.
"""
......@@ -131,8 +132,7 @@ def main():
parser = argparse.ArgumentParser(
description="Generate tokens for enabling experimental features")
parser.add_argument(
"version",
parser.add_argument("--version",
help="Token version to use. Currently only version 2"
"and version 3 are supported.",
type=VersionFromArg)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment