Skip to content

Commit 059f54e

Browse files
committed
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
1 parent 31ff21c commit 059f54e

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

openstackclient/api/object_store_v1.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@
2020
import six
2121
from six.moves import urllib
2222

23-
try:
24-
from urllib.parse import urlparse # noqa
25-
except ImportError:
26-
from urlparse import urlparse # noqa
27-
2823
from openstackclient.api import api
2924
from openstackclient.common import utils
3025

@@ -525,7 +520,7 @@ def account_unset(
525520
self.create("", headers=headers)
526521

527522
def _find_account_id(self):
528-
url_parts = urlparse(self.endpoint)
523+
url_parts = urllib.parse.urlparse(self.endpoint)
529524
return url_parts.path.split('/')[-1]
530525

531526
def _unset_properties(self, properties, header_tag):

0 commit comments

Comments
 (0)