bisect-kit: fix lint warnings from new lint rules
This also improved python3 compatibility.
BUG=b:140004822
TEST=pylint; unittest
Change-Id: I487e25a055190dd5d4059e8a0c0589170c182dea
diff --git a/bisect_kit/android_util.py b/bisect_kit/android_util.py
index 3f6f697..559143f 100644
--- a/bisect_kit/android_util.py
+++ b/bisect_kit/android_util.py
@@ -60,10 +60,10 @@
# Following code is just serving as demo purpose. You should modify or hook
# it with your own implementation.
logger.warn('fetch_android_build_data need to be hooked')
- import urllib2
+ from six.moves import urllib
try:
- return urllib2.urlopen(url).read()
- except urllib2.URLError as e:
+ return urllib.request.urlopen(url).read()
+ except urllib.request.URLError as e:
logger.exception('failed to fetch "%s"', url)
raise errors.ExternalError(str(e))