Use six.moves.urllib.parse instead of urlparse
To keep Python 3.x compatibility, use six.moves.urllib.parse to replace urlparse. tools/lintstack is changed to pass pylint test. Partial-Bug: #1279611 Change-Id: I0ceaaccbf6c67b45609b4f2f5639c362b32d10ad
This commit is contained in:
parent
9046e6ee82
commit
2fad54233d
@ -16,9 +16,9 @@
|
||||
|
||||
import os
|
||||
import re
|
||||
import urlparse
|
||||
|
||||
from oslo.config import cfg
|
||||
import six.moves.urllib.parse as urlparse
|
||||
import webob
|
||||
|
||||
from cinder.api.openstack import wsgi
|
||||
|
@ -25,10 +25,10 @@ import random
|
||||
import shutil
|
||||
import sys
|
||||
import time
|
||||
import urlparse
|
||||
|
||||
import glanceclient.exc
|
||||
from oslo.config import cfg
|
||||
import six.moves.urllib.parse as urlparse
|
||||
|
||||
from cinder import exception
|
||||
from cinder.openstack.common import jsonutils
|
||||
|
@ -14,7 +14,8 @@
|
||||
|
||||
import netaddr
|
||||
import requests
|
||||
import urlparse
|
||||
|
||||
import six.moves.urllib.parse as urlparse
|
||||
|
||||
from cinder.openstack.common import jsonutils
|
||||
from cinder.openstack.common import log as logging
|
||||
|
@ -26,10 +26,10 @@ if possible.
|
||||
import ConfigParser
|
||||
import os
|
||||
import subprocess
|
||||
import urlparse
|
||||
import uuid
|
||||
|
||||
from migrate.versioning import repository
|
||||
import six.moves.urllib.parse as urlparse
|
||||
import sqlalchemy
|
||||
import testtools
|
||||
|
||||
|
@ -25,9 +25,9 @@ import cookielib
|
||||
import math
|
||||
import urllib
|
||||
import urllib2
|
||||
import urlparse
|
||||
|
||||
from oslo.config import cfg
|
||||
import six.moves.urllib.parse as urlparse
|
||||
|
||||
from cinder import exception
|
||||
from cinder.openstack.common import jsonutils
|
||||
|
@ -18,7 +18,8 @@ Client classes for web services.
|
||||
|
||||
import json
|
||||
import requests
|
||||
import urlparse
|
||||
|
||||
import six.moves.urllib.parse as urlparse
|
||||
|
||||
from cinder import exception
|
||||
from cinder.openstack.common import log as logging
|
||||
|
@ -21,9 +21,10 @@ import os
|
||||
import re
|
||||
from threading import Timer
|
||||
import time
|
||||
import urlparse
|
||||
import uuid
|
||||
|
||||
import six.moves.urllib.parse as urlparse
|
||||
|
||||
from cinder import exception
|
||||
from cinder.image import image_utils
|
||||
from cinder.openstack.common import excutils
|
||||
|
@ -22,7 +22,8 @@
|
||||
"""
|
||||
|
||||
import re
|
||||
import urlparse
|
||||
|
||||
import six.moves.urllib.parse as urlparse
|
||||
|
||||
from cinder import units
|
||||
|
||||
|
@ -20,9 +20,9 @@ Scality SOFS Volume Driver.
|
||||
import errno
|
||||
import os
|
||||
import urllib2
|
||||
import urlparse
|
||||
|
||||
from oslo.config import cfg
|
||||
import six.moves.urllib.parse as urlparse
|
||||
|
||||
from cinder import exception
|
||||
from cinder.image import image_utils
|
||||
|
@ -23,7 +23,8 @@ import httplib
|
||||
import netaddr
|
||||
import urllib
|
||||
import urllib2
|
||||
import urlparse
|
||||
|
||||
import six.moves.urllib.parse as urlparse
|
||||
|
||||
from cinder.openstack.common import log as logging
|
||||
from cinder.volume.drivers.vmware import error_util
|
||||
|
@ -30,7 +30,9 @@ from six.moves import cStringIO as StringIO
|
||||
ignore_codes = ["E1103"]
|
||||
# Note(maoy): the error message is the pattern of E0202. It should be ignored
|
||||
# for cinder.tests modules
|
||||
ignore_messages = ["An attribute affected in cinder.tests"]
|
||||
#Note(fengqian): the second error message is the pattern of [E0611].
|
||||
#It should be ignored because use six module to keep py3.X compatibility.
|
||||
ignore_messages = ["An attribute affected in cinder.tests", "No name 'urllib' in module '_MovedItems'"]
|
||||
# Note(maoy): we ignore all errors in openstack.common because it should be
|
||||
# checked elsewhere. We also ignore cinder.tests for now due to high false
|
||||
# positive rate.
|
||||
|
Loading…
Reference in New Issue
Block a user