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
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
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
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
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
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
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
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
"""
import re
-import urlparse
+
+import six.moves.urllib.parse as urlparse
from cinder import units
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
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
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.