[subprocess2] Replace VOID with DEVNULL

subprocess.DEVNULL was introduced in Python3 to serve same purpose
as subprocess2.VOID, so rename VOID to DEVNULL in subprocess2.

Change-Id: I6dade3306ffc3bc2441ac6083f362b099c2427e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2587758
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
This commit is contained in:
Edward Lesmes
2020-12-14 22:03:23 +00:00
committed by LUCI CQ
parent 9c7f6c25c0
commit cf06cad1be
7 changed files with 29 additions and 29 deletions

View File

@@ -63,10 +63,10 @@ def check_call(*args, **kwargs):
def return_code(*args, **kwargs):
"""subprocess2.call() passing shell=True on Windows for git and
subprocess2.VOID for stdout and stderr."""
subprocess2.DEVNULL for stdout and stderr."""
kwargs.setdefault('shell', NEED_SHELL)
kwargs.setdefault('stdout', subprocess2.VOID)
kwargs.setdefault('stderr', subprocess2.VOID)
kwargs.setdefault('stdout', subprocess2.DEVNULL)
kwargs.setdefault('stderr', subprocess2.DEVNULL)
return subprocess2.call(*args, **kwargs)