From 8732c0efd3ab66a7120d2bb21759687e09c9f207 Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Wed, 9 Dec 2020 17:43:46 +0000 Subject: [PATCH] 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 Reviewed-by: Edward Lesmes Auto-Submit: Corentin Wallez --- roll_dep.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roll_dep.py b/roll_dep.py index f5f8a605d..ef19a364c 100755 --- a/roll_dep.py +++ b/roll_dep.py @@ -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('')