Explorar o código

Fix bytes vs str error in DownloadGerritHook.

It fails with: `write() argument must be str, not bytes`.

R=sokcevic@google.com

Change-Id: If6787140ea863ce3761a5c3747eb0b857b22fa47
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3276505
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
Vadim Shtayura %!s(int64=3) %!d(string=hai) anos
pai
achega
f7b8f8f3cd
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      git_cl.py

+ 1 - 1
git_cl.py

@@ -3012,7 +3012,7 @@ def urlretrieve(source, destination):
 
   This is necessary because urllib is broken for SSL connections via a proxy.
   """
-  with open(destination, 'w') as f:
+  with open(destination, 'wb') as f:
     f.write(urllib.request.urlopen(source).read())