Keep py3.X compatibility for urllib

Replace urllib with six.moves.urlparse

Change-Id: I224b7b00f7ecbe6d44ce5c9414bdaab825cbd6c7
This commit is contained in:
ting.wang
2016-01-14 11:01:58 +08:00
parent 9c33f8aaeb
commit 61c926a10b

View File

@@ -12,8 +12,8 @@
import functools
import json
import urllib
import six.moves.urllib.parse as urlparse
from tempest.common import service_client
@@ -107,7 +107,7 @@ class InfraOptimClient(service_client.ServiceClient):
uri = self._get_uri(resource, permanent=permanent)
if kwargs:
uri += "?%s" % urllib.urlencode(kwargs)
uri += "?%s" % urlparse.urlencode(kwargs)
resp, body = self.get(uri)
self.expected_success(200, resp['status'])