From b806e17eb27864a9719d4f03c4d1383c82a716ca Mon Sep 17 00:00:00 2001 From: Edward Lesmes Date: Tue, 28 Apr 2020 18:59:38 +0000 Subject: [PATCH] git-drover: Don't attempt to decode output of check_call. When interactive is true, check_call is used instead of check_output, and check_call doesn't return the command output. Bug: 1074357 Change-Id: Ib9e761d41d754df58c9ee1f897dde173ce4d9eff Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2170805 Reviewed-by: Josip Sokcevic Commit-Queue: Edward Lesmes --- git_drover.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git_drover.py b/git_drover.py index 8407ec422..8507fdc6d 100755 --- a/git_drover.py +++ b/git_drover.py @@ -321,7 +321,7 @@ class _Drover(object): try: rv = run(['git'] + args, shell=False, cwd=cwd, stderr=stderr) - if sys.version_info.major == 3: + if not interactive and sys.version_info.major == 3: return rv.decode('utf-8', 'ignore') return rv except (OSError, subprocess.CalledProcessError) as e: