Commit e861d775 authored by Glen Robertson's avatar Glen Robertson Committed by Commit Bot

generate_token: Give version arg a default value (3).

Also a more useful error message if incorrect.
This makes it works as documented in docs/origin_trials_integration.md

Change-Id: I97d549d10917911d636fc8d41ebd58b1f32838de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2415750
Auto-Submit: Glen Robertson <glenrob@chromium.org>
Commit-Queue: Jason Chase <chasej@chromium.org>
Reviewed-by: default avatarJason Chase <chasej@chromium.org>
Cr-Commit-Position: refs/heads/master@{#807898}
parent ab32ceea
......@@ -142,6 +142,7 @@ def main():
parser.add_argument("--version",
help="Token version to use. Currently only version 2"
"and version 3 are supported.",
default='3',
type=VersionFromArg)
parser.add_argument("origin",
help="Origin for which to enable the feature. This can "
......@@ -214,7 +215,7 @@ def main():
sys.exit(1)
if (not args.version):
print("Invalid token version.")
print("Invalid token version. Only version 2 and 3 are supported.")
sys.exit(1)
if (args.is_third_party is not None and args.version[0] != 3):
......
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