summaryrefslogtreecommitdiffstats
path: root/repo
diff options
context:
space:
mode:
authorMike Frysinger <vapier@google.com>2019-07-04 17:54:54 -0400
committerMike Frysinger <vapier@google.com>2019-07-04 18:19:00 -0400
commit1b9adab75a87c5eb94c3c3b653fdc2c123ba0077 (patch)
tree32fe34adf853573fb11749f09b60c8a0f7b93399 /repo
parent3698ab7c9200a2b65652e9a5f3a763cd7629af0c (diff)
downloadgit-repo-1b9adab75a87c5eb94c3c3b653fdc2c123ba0077.tar.gz
handle binary stream from urllib.request.urlopen
Python 3 returns bytes by default with urlopen. Adjust our code to handle that scenario and decode as necessary. Bug: https://crbug.com/gerrit/10418 Change-Id: Icf4cd80e7ef92d71a3eefbc6113f1ba11c32eebc
Diffstat (limited to 'repo')
-rwxr-xr-xrepo2
1 files changed, 1 insertions, 1 deletions
diff --git a/repo b/repo
index aa357a22..ce42ad06 100755
--- a/repo
+++ b/repo
@@ -583,7 +583,7 @@ def _DownloadBundle(url, local, quiet):
583 print('Get %s' % url, file=sys.stderr) 583 print('Get %s' % url, file=sys.stderr)
584 while True: 584 while True:
585 buf = r.read(8192) 585 buf = r.read(8192)
586 if buf == '': 586 if not buf:
587 return True 587 return True
588 dest.write(buf) 588 dest.write(buf)
589 finally: 589 finally: