Commit f79e4320 authored by Yoshisato Yanagisawa's avatar Yoshisato Yanagisawa Committed by LUCI CQ

Revert "Avoid capture_output to support Python 3.6"

This reverts commit 2241db8a.

Reason for revert:
Cannot merge https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2632018 due to conflict.

Original change's description:
> Avoid capture_output to support Python 3.6
>
> autoninja.py uses subprocess.run which requires Python 3 and used
> capture_output which requires Python 3.6. One user reported this as an
> issue and it turns out that it is easy to avoid by using subprocess.NULL
> which then means that Python versions back to 3.3 are supported.
>
> Bug: 868590, b/174673874
> Change-Id: Ife5e186d9c54747d35ff989dc2afadba5b9a57f5
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2630525
> Auto-Submit: Bruce Dawson <brucedawson@chromium.org>
> Reviewed-by: Justin Cohen <justincohen@chromium.org>
> Commit-Queue: Bruce Dawson <brucedawson@chromium.org>

TBR=justincohen@chromium.org,brucedawson@chromium.org,infra-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I5131a43eeb9410a6b45920d409a392a2df9d9af0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 868590
Bug: b/174673874
Bug: 1167064
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2632022Reviewed-by: 's avatarYoshisato Yanagisawa <yyanagisawa@google.com>
Commit-Queue: Yoshisato Yanagisawa <yyanagisawa@google.com>
parent 091f5ac0
......@@ -112,9 +112,7 @@ if offline or goma_disabled_env in ['true', 't', 'yes', 'y', '1']:
if use_remote_build and remote_build_is_goma:
# Check to make sure that goma is running. If not, don't start the build.
gomacc_path = os.path.join(sys.path[0], '.cipd_bin', 'gomacc')
status = subprocess.run([gomacc_path, 'port'],
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL).returncode
status = subprocess.run([gomacc_path, 'port'], capture_output=True).returncode
if status == 1:
print('echo Goma is not running. Use "goma_ctl start" to start it.')
sys.exit(0)
......@@ -180,3 +178,4 @@ if offline and not sys.platform.startswith('win'):
print('RBE_remote_disabled=1 GOMA_DISABLED=1 ' + ' '.join(args))
else:
print(' '.join(args))
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