From 0959bb1c2a93606c91474f89a055b537fde34c0e Mon Sep 17 00:00:00 2001 From: Marc-Antoine Ruel Date: Tue, 6 Sep 2022 19:15:01 +0000 Subject: [PATCH] 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 Auto-Submit: Marc-Antoine Ruel Reviewed-by: Josip Sokcevic --- git_retry.py | 1 + 1 file changed, 1 insertion(+) diff --git a/git_retry.py b/git_retry.py index e67ef1e45..1ae63f8ab 100755 --- a/git_retry.py +++ b/git_retry.py @@ -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)