bisect-kit: use python3 feature to simplify code
BUG=None
TEST=unittest
Change-Id: I13207022442f2ecf329ad122630cef8c2a242753
diff --git a/setup_cros_bisect.py b/setup_cros_bisect.py
index f49fdef..04c148a 100755
--- a/setup_cros_bisect.py
+++ b/setup_cros_bisect.py
@@ -277,9 +277,7 @@
def query_chrome_latest_branch():
result = 0
r = urllib.request.urlopen('https://omahaproxy.appspot.com/all')
- # TODO(kcwu): use io.TextIOWrapper after migrated to python3
- content = r.read().decode('utf8')
- for row in csv.DictReader(io.StringIO(content)):
+ for row in csv.DictReader(io.TextIOWrapper(r, encoding='utf-8')):
if row['true_branch'].isdigit():
result = max(result, int(row['true_branch']))
return result