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 <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
diff --git a/git_drover.py b/git_drover.py
index 8407ec4..8507fdc 100755
--- a/git_drover.py
+++ b/git_drover.py
@@ -321,7 +321,7 @@
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: