Fix six.moves import for pep8

Change-Id: I2cdb771676c1d8114dd7c60f9520767b705a964e
This commit is contained in:
Adit Sarfaty 2018-07-05 14:58:14 +03:00
parent b09de3485d
commit 0d04f944db
2 changed files with 4 additions and 4 deletions

View File

@ -19,7 +19,7 @@ import eventlet
from oslo_log import log as logging
from oslo_serialization import jsonutils
from six.moves import http_client as httplib
from six.moves.urllib import parse
from six.moves import urllib
from vmware_nsx._i18n import _
from vmware_nsx.api_client import request
@ -169,7 +169,7 @@ class LoginRequestEventlet(EventletApiRequest):
if headers is None:
headers = {}
headers.update({"Content-Type": "application/x-www-form-urlencoded"})
body = parse.urlencode({"username": user, "password": password})
body = urllib.parse.urlencode({"username": user, "password": password})
super(LoginRequestEventlet, self).__init__(
client_obj, "/ws.v1/login", "POST", body, headers,
auto_login=False, client_conn=client_conn)

View File

@ -25,7 +25,7 @@ from oslo_log import log as logging
from oslo_utils import excutils
import six
from six.moves import http_client as httplib
import six.moves.urllib.parse as urlparse
from six.moves import urllib
from vmware_nsx._i18n import _
from vmware_nsx import api_client
@ -240,7 +240,7 @@ class ApiRequest(object):
# 2. scheme://hostname:[port]/path where scheme is https or http
# Reject others
# 3. e.g. relative paths, unsupported scheme, unspecified host
result = urlparse.urlparse(url)
result = urllib.parse.urlparse(url)
if not result.scheme and not result.hostname and result.path:
if result.path[0] == "/":
if result.query: