Use six.moves.urllib.parse instead of urlparse

To keep Python 3.x compatibility, use six.moves.urllib.parse
to replace urlparse.

Change-Id: I23df3455d6293711572a48165964644cb18d175b
This commit is contained in:
tanlin 2014-02-12 11:55:34 +08:00
parent 6d593641a0
commit 5d6a653928
20 changed files with 22 additions and 24 deletions

View File

@ -18,11 +18,10 @@ Starting point for routing EC2 requests.
"""
import urlparse
from eventlet.green import httplib
from oslo.config import cfg
import six
import six.moves.urllib.parse as urlparse
import webob
import webob.dec
import webob.exc

View File

@ -17,9 +17,9 @@ import functools
import itertools
import os
import re
import urlparse
from oslo.config import cfg
import six.moves.urllib.parse as urlparse
import webob
from webob import exc

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import urlparse
import six.moves.urllib.parse as urlparse
import webob
from nova.api.openstack import extensions

View File

@ -14,9 +14,9 @@
# under the License.
import datetime
import urlparse
import iso8601
import six.moves.urllib.parse as urlparse
from webob import exc
from nova.api.openstack import extensions

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import urlparse
import six.moves.urllib.parse as urlparse
import webob
from nova.api.openstack import extensions

View File

@ -23,12 +23,12 @@ import json
import random
import sys
import time
import urlparse
import glanceclient
import glanceclient.exc
from oslo.config import cfg
import six
import six.moves.urllib.parse as urlparse
from nova import exception
import nova.image.download as image_xfers

View File

@ -13,10 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.
import six.moves.urllib.parse as urlparse
import webob
import urlparse
from nova.api.openstack.compute.plugins.v3 import flavors
from nova.openstack.common import jsonutils

View File

@ -18,11 +18,11 @@ import base64
import datetime
import mox
import testtools
import urlparse
import uuid
import iso8601
from oslo.config import cfg
import six.moves.urllib.parse as urlparse
import webob
from nova.api.openstack import compute

View File

@ -14,10 +14,9 @@
# under the License.
from lxml import etree
import six.moves.urllib.parse as urlparse
import webob
import urlparse
from nova.api.openstack.compute import flavors
from nova.api.openstack import xmlutil
import nova.compute.flavors

View File

@ -19,9 +19,9 @@ and as a WSGI layer
"""
import copy
import urlparse
from lxml import etree
import six.moves.urllib.parse as urlparse
import webob
from nova.api.openstack.compute import images

View File

@ -18,13 +18,13 @@
import base64
import datetime
import testtools
import urlparse
import uuid
import iso8601
from lxml import etree
import mox
from oslo.config import cfg
import six.moves.urllib.parse as urlparse
import webob
from nova.api.openstack import compute

View File

@ -44,9 +44,9 @@ postgres=# create database openstack_baremetal_citest with owner
import ConfigParser
import glob
import os
import urlparse
from migrate.versioning import repository
import six.moves.urllib.parse as urlparse
import sqlalchemy
import sqlalchemy.exc

View File

@ -14,7 +14,8 @@
import httplib
import urllib
import urlparse
import six.moves.urllib.parse as urlparse
from nova.openstack.common.gettextutils import _
from nova.openstack.common import jsonutils

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import urlparse
import six.moves.urllib.parse as urlparse
from cinderclient import exceptions as cinder_exception
from nova import context

View File

@ -20,10 +20,10 @@ import glob
import os
import time
import urllib2
import urlparse
from oslo.config import cfg
import six
import six.moves.urllib.parse as urlparse
from nova import exception
from nova.openstack.common.gettextutils import _

View File

@ -23,7 +23,8 @@ Collection of classes to handle image upload/download to/from Image service
import httplib
import urllib
import urllib2
import urlparse
import six.moves.urllib.parse as urlparse
from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging

View File

@ -36,9 +36,9 @@ A driver for XenServer or Xen Cloud Platform.
"""
import math
import urlparse
from oslo.config import cfg
import six.moves.urllib.parse as urlparse
from nova.openstack.common.gettextutils import _
from nova.openstack.common import jsonutils

View File

@ -14,9 +14,9 @@
# under the License.
import pkg_resources
import urlparse
from oslo.config import cfg
import six.moves.urllib.parse as urlparse
from nova.openstack.common.gettextutils import _
import nova.openstack.common.log as logging

View File

@ -17,9 +17,8 @@
Management class for Pool-related functions (join, eject, etc).
"""
import urlparse
from oslo.config import cfg
import six.moves.urllib.parse as urlparse
from nova.compute import rpcapi as compute_rpcapi
from nova import exception

View File

@ -23,12 +23,12 @@ import contextlib
import os
import time
import urllib
import urlparse
import uuid
from xml.parsers import expat
from eventlet import greenthread
from oslo.config import cfg
import six.moves.urllib.parse as urlparse
from nova.api.metadata import base as instance_metadata
from nova import block_device