Browse Source

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>
Edward Lesmes 5 years ago
parent
commit
b806e17eb2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      git_drover.py

+ 1 - 1
git_drover.py

@@ -321,7 +321,7 @@ class _Drover(object):
 
 
     try:
     try:
       rv = run(['git'] + args, shell=False, cwd=cwd, stderr=stderr)
       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.decode('utf-8', 'ignore')
       return rv
       return rv
     except (OSError, subprocess.CalledProcessError) as e:
     except (OSError, subprocess.CalledProcessError) as e: