From 1b9adab75a87c5eb94c3c3b653fdc2c123ba0077 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 4 Jul 2019 17:54:54 -0400 Subject: 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 --- repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'repo') diff --git a/repo b/repo index aa357a22..ce42ad06 100755 --- a/repo +++ b/repo @@ -583,7 +583,7 @@ def _DownloadBundle(url, local, quiet): print('Get %s' % url, file=sys.stderr) while True: buf = r.read(8192) - if buf == '': + if not buf: return True dest.write(buf) finally: -- cgit v1.2.3-54-g00ecf