diff options
author | Bruno ReniƩ <brutasse@gmail.com> | 2014-08-28 20:50:20 +0200 |
---|---|---|
committer | Mark Roberts <wizzat@fb.com> | 2014-09-03 09:55:44 -0700 |
commit | cf0b7f0530e765f2cf710bd35daf53bb4ea205d2 (patch) | |
tree | f38669f145112a7f301691f311b3c8aca51d1f59 /test/fixtures.py | |
parent | 83af5102e995e854a1980b90f1400afdd098da37 (diff) | |
download | kafka-python-cf0b7f0530e765f2cf710bd35daf53bb4ea205d2.tar.gz |
Make all unit tests pass on py3.3/3.4
Diffstat (limited to 'test/fixtures.py')
-rw-r--r-- | test/fixtures.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/fixtures.py b/test/fixtures.py index 152777c..b286619 100644 --- a/test/fixtures.py +++ b/test/fixtures.py @@ -4,10 +4,10 @@ import os.path import shutil import subprocess import tempfile -import urllib2 +from six.moves import urllib import uuid -from urlparse import urlparse +from six.moves.urllib.parse import urlparse # pylint: disable-msg=E0611 from test.service import ExternalService, SpawnedService from test.testutil import get_open_port @@ -42,12 +42,12 @@ class Fixture(object): try: url = url_base + distfile + '.tgz' logging.info("Attempting to download %s", url) - response = urllib2.urlopen(url) - except urllib2.HTTPError: + response = urllib.request.urlopen(url) + except urllib.error.HTTPError: logging.exception("HTTP Error") url = url_base + distfile + '.tar.gz' logging.info("Attempting to download %s", url) - response = urllib2.urlopen(url) + response = urllib.request.urlopen(url) logging.info("Saving distribution file to %s", output_file) with open(output_file, 'w') as output_file_fd: |