diff options
author | Matthew Treinish <mtreinish@kortar.org> | 2015-04-23 09:47:50 -0400 |
---|---|---|
committer | Matthew Treinish <mtreinish@kortar.org> | 2015-04-23 12:00:18 -0400 |
commit | 6421af80deb28563a07f256f5195dd1c5d008ca2 (patch) | |
tree | 3714607e0c7a418a69a66b6bbc2f982d910a2fe2 | |
parent | fcd9a080dba1237780361b28b38c15ece634e176 (diff) | |
download | tempest-6421af80deb28563a07f256f5195dd1c5d008ca2.tar.gz |
Switch all uses of httplib to import from six
As part of enabling python3 support in tempest we need to be able to
handle httplib usage in both python2 and python3. Six provides a compat
layer for doing this, so this commit moves all uses of httplib to get
it through six.
Change-Id: Ibf1d87908fe4004b37320439386abe5b1dc4bb51
-rw-r--r-- | tempest/common/glance_http.py | 2 | ||||
-rw-r--r-- | tempest/services/object_storage/object_client.py | 2 | ||||
-rw-r--r-- | tempest/tests/test_glance_http.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/tempest/common/glance_http.py b/tempest/common/glance_http.py index fb5958ca0..5cd844cb1 100644 --- a/tempest/common/glance_http.py +++ b/tempest/common/glance_http.py @@ -17,7 +17,6 @@ import copy import hashlib -import httplib import json import posixpath import re @@ -28,6 +27,7 @@ import OpenSSL from oslo_log import log as logging import six from six import moves +from six.moves import http_client as httplib from six.moves.urllib import parse as urlparse from tempest_lib import exceptions as lib_exc diff --git a/tempest/services/object_storage/object_client.py b/tempest/services/object_storage/object_client.py index 0e02bbc22..3466c8afa 100644 --- a/tempest/services/object_storage/object_client.py +++ b/tempest/services/object_storage/object_client.py @@ -13,9 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -import httplib import urllib +from six.moves import http_client as httplib from six.moves.urllib import parse as urlparse from tempest.common import service_client diff --git a/tempest/tests/test_glance_http.py b/tempest/tests/test_glance_http.py index 84b66d76f..b132f6072 100644 --- a/tempest/tests/test_glance_http.py +++ b/tempest/tests/test_glance_http.py @@ -13,13 +13,13 @@ # License for the specific language governing permissions and limitations # under the License. -import httplib import json import socket import mock from oslotest import mockpatch import six +from six.moves import http_client as httplib from tempest_lib import exceptions as lib_exc from tempest.common import glance_http |