Fix git-retry on errors

On macOS, it failed with:
  Exception in thread git-retry.tee.stderr:
  Traceback (most recent call last):
    File "/path/to/cipd's/3.8/lib/python3.8/threading.py", line 932, in _bootstrap_inner
      self.run()
    File "$HOME/depot_tools/git_retry.py", line 36, in run
      self.out_fd.write(line)

  TypeError: write() argument must be str, not bytes
Change-Id: Ib2a77731dee10b6bb2a2ea2a7ffeaf1165e15df6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3873929
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Auto-Submit: Marc-Antoine Ruel <maruel@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
changes/29/3873929/2
Marc-Antoine Ruel 3 years ago committed by LUCI CQ
parent 2d4b9c8737
commit 0959bb1c2a

@ -32,6 +32,7 @@ class TeeThread(threading.Thread):
def run(self):
chunks = []
for line in self.fd:
line = line.decode('utf-8')
chunks.append(line)
self.out_fd.write(line)
self.data = ''.join(chunks)

Loading…
Cancel
Save