mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
download_from_google_storage: Use vpython3 instead of vpython
We have vpython wheels for py3 but not for py2 on mac/arm. With this, download_from_google_storage.py works on arm mac even without the vpython bypass. (Also, moving from py2 to py3 seems like a good thing in general.) Bug: 1205263,1103236 Change-Id: I6cb08b7c56e5e6fc160fb5abc86d68e04a01f8de Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2881917 Auto-Submit: Nico Weber <thakis@chromium.org> Commit-Queue: Dirk Pranke <dpranke@google.com> Reviewed-by: Dirk Pranke <dpranke@google.com>
This commit is contained in:
@@ -76,7 +76,8 @@ class Gsutil(object):
|
||||
MAX_TRIES = 5
|
||||
RETRY_BASE_DELAY = 5.0
|
||||
RETRY_DELAY_MULTIPLE = 1.3
|
||||
VPYTHON = 'vpython.bat' if GetNormalizedPlatform() == 'win32' else 'vpython'
|
||||
VPYTHON3 = ('vpython3.bat'
|
||||
if GetNormalizedPlatform() == 'win32' else 'vpython3')
|
||||
|
||||
def __init__(self, path, boto_path=None, version='4.28'):
|
||||
if not os.path.exists(path):
|
||||
@@ -100,12 +101,12 @@ class Gsutil(object):
|
||||
return env
|
||||
|
||||
def call(self, *args):
|
||||
cmd = [self.VPYTHON, self.path, '--force-version', self.version]
|
||||
cmd = [self.VPYTHON3, self.path, '--force-version', self.version]
|
||||
cmd.extend(args)
|
||||
return subprocess2.call(cmd, env=self.get_sub_env())
|
||||
|
||||
def check_call(self, *args):
|
||||
cmd = [self.VPYTHON, self.path, '--force-version', self.version]
|
||||
cmd = [self.VPYTHON3, self.path, '--force-version', self.version]
|
||||
cmd.extend(args)
|
||||
((out, err), code) = subprocess2.communicate(
|
||||
cmd,
|
||||
|
||||
Reference in New Issue
Block a user