Clean up unnecessary import of urlparse module

six.moves.urllib already covers the py2 and py3 compatibility issues
of urlparse module, use six.moves.urllib.parse.urlparse is enough.

Change-Id: I785f4f872850e5d770fdcf4c0d3392be3978cc4a
This commit is contained in:
Yang Hongyang 2016-03-01 22:03:02 +08:00
parent 31ff21c511
commit 059f54eee4
1 changed files with 1 additions and 6 deletions

View File

@ -20,11 +20,6 @@ import os
import six
from six.moves import urllib
try:
from urllib.parse import urlparse # noqa
except ImportError:
from urlparse import urlparse # noqa
from openstackclient.api import api
from openstackclient.common import utils
@ -525,7 +520,7 @@ class APIv1(api.BaseAPI):
self.create("", headers=headers)
def _find_account_id(self):
url_parts = urlparse(self.endpoint)
url_parts = urllib.parse.urlparse(self.endpoint)
return url_parts.path.split('/')[-1]
def _unset_properties(self, properties, header_tag):