Commit 8cfa89bf authored by dtu@chromium.org's avatar dtu@chromium.org

Disable retries when gsutil runs loas_check.

By default, if loasd is not running, loas_check retries twice, waiting 5 seconds between retries. This is in case loasd is restarting due to reinstallation. Unfortunately, if the user has never run prodaccess, this check takes an extra 10 seconds. So, just disable the retries.

BUG=

Review URL: https://codereview.chromium.org/137853024

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@245399 0039d316-1c4b-4281-b951-d872f2087c98
parent 6911307d
...@@ -45,7 +45,7 @@ class SSOAuth(AuthHandler): ...@@ -45,7 +45,7 @@ class SSOAuth(AuthHandler):
def __init__(self, path, config, provider): def __init__(self, path, config, provider):
if provider.name == 'google' and self.has_prodaccess(): if provider.name == 'google' and self.has_prodaccess():
# If we don't have a loas token, then bypass this auth handler. # If we don't have a loas token, then bypass this auth handler.
if subprocess.call('loas_check', if subprocess.call(['loas_check', '-loas_check_retry_attempts=0'],
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE): stderr=subprocess.PIPE):
raise NotReadyToAuthenticate() raise NotReadyToAuthenticate()
......
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