mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 10:41:31 +00:00
roll_dep.py: Fix outstanding references to subprocess
https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2512921 changed roll_dep.py to use subprocess2 instead of subprocess but some references weren't updated. Bug: chromium:1156908 Change-Id: Icac020b463d1b68a4fca5b4ddf5cb80b9bfa9516 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2581545 Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org> Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org> Auto-Submit: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
@@ -50,19 +50,19 @@ class AlreadyRolledError(Error):
|
||||
|
||||
|
||||
def check_output(*args, **kwargs):
|
||||
"""subprocess.check_output() passing shell=True on Windows for git."""
|
||||
"""subprocess2.check_output() passing shell=True on Windows for git."""
|
||||
kwargs.setdefault('shell', NEED_SHELL)
|
||||
return subprocess2.check_output(*args, **kwargs).decode('utf-8')
|
||||
|
||||
|
||||
def check_call(*args, **kwargs):
|
||||
"""subprocess.check_call() passing shell=True on Windows for git."""
|
||||
"""subprocess2.check_call() passing shell=True on Windows for git."""
|
||||
kwargs.setdefault('shell', NEED_SHELL)
|
||||
subprocess2.check_call(*args, **kwargs)
|
||||
|
||||
|
||||
def return_code(*args, **kwargs):
|
||||
"""subprocess.call() passing shell=True on Windows for git and
|
||||
"""subprocess2.call() passing shell=True on Windows for git and
|
||||
subprocess2.VOID for stdout and stderr."""
|
||||
kwargs.setdefault('shell', NEED_SHELL)
|
||||
kwargs.setdefault('stdout', subprocess2.VOID)
|
||||
@@ -286,7 +286,7 @@ def main():
|
||||
except Error as e:
|
||||
sys.stderr.write('error: %s\n' % e)
|
||||
return 2 if isinstance(e, AlreadyRolledError) else 1
|
||||
except subprocess.CalledProcessError:
|
||||
except subprocess2.CalledProcessError:
|
||||
return 1
|
||||
|
||||
print('')
|
||||
|
||||
Reference in New Issue
Block a user