Commit 0959bb1c authored by Marc-Antoine Ruel's avatar Marc-Antoine Ruel Committed by LUCI CQ

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: 's avatarJosip Sokcevic <sokcevic@google.com>
parent 2d4b9c87
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment