commit | 1b9adab75a87c5eb94c3c3b653fdc2c123ba0077 | [log] [tgz] |
---|---|---|
author | Mike Frysinger <vapier@google.com> | Thu Jul 04 17:54:54 2019 -0400 |
committer | Mike Frysinger <vapier@google.com> | Thu Jul 04 18:19:00 2019 -0400 |
tree | 32fe34adf853573fb11749f09b60c8a0f7b93399 | |
parent | 3698ab7c9200a2b65652e9a5f3a763cd7629af0c [diff] [blame] |
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
diff --git a/repo b/repo index aa357a2..ce42ad0 100755 --- a/repo +++ b/repo
@@ -583,7 +583,7 @@ print('Get %s' % url, file=sys.stderr) while True: buf = r.read(8192) - if buf == '': + if not buf: return True dest.write(buf) finally: