Procházet zdrojové kódy

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 před 5 roky
rodič
revize
b806e17eb2
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      git_drover.py

+ 1 - 1
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: