Commit 7c91a99e authored by Lambros Lambrou's avatar Lambros Lambrou Committed by Commit Bot

Run config upgrade tool on Linux

This updates the Python script to run the upgrade tool each time it is
started.

Bug: 954427
Change-Id: If4fc566698ecc443ef06840385c90ff0be43808f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1629489Reviewed-by: default avatarJoe Downing <joedow@chromium.org>
Commit-Queue: Lambros Lambrou <lambroslambrou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#664317}
parent cfc6aa1f
......@@ -1419,6 +1419,9 @@ Web Store: https://chrome.google.com/remotedesktop"""
parser.add_argument("--watch-resolution", dest="watch_resolution",
type=int, nargs=2, default=False, action="store",
help=argparse.SUPPRESS)
parser.add_argument("--skip-config-upgrade", dest="skip_config_upgrade",
default=False, action="store_true",
help="Skip running the config upgrade tool.")
parser.add_argument(dest="args", nargs="*", help=argparse.SUPPRESS)
options = parser.parse_args()
......@@ -1585,6 +1588,15 @@ Web Store: https://chrome.google.com/remotedesktop"""
# Register an exit handler to clean up session process and the PID file.
atexit.register(cleanup)
# Run the config upgrade tool, to update the refresh token if needed.
# TODO(lambroslambrou): Respect CHROME_REMOTE_DESKTOP_HOST_EXTRA_PARAMS
# and the GOOGLE_CLIENT... variables, and fix the tool to work in a
# test environment.
if not options.skip_config_upgrade:
args = [HOST_BINARY_PATH, "--upgrade-token",
"--host-config=%s" % config_file]
subprocess.check_call(args);
# Load the initial host configuration.
host_config = Config(config_file)
try:
......
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