|
24 | 24 | import os |
25 | 25 | import pkgutil |
26 | 26 | import re |
27 | | -import six |
| 27 | +import urllib |
| 28 | +from urllib import parse as urlparse |
28 | 29 |
|
29 | 30 | from keystoneauth1 import access |
30 | 31 | from keystoneauth1 import adapter |
|
34 | 35 | from oslo_utils import importutils |
35 | 36 | from oslo_utils import strutils |
36 | 37 | import requests |
37 | | -from six.moves import urllib |
38 | | -import six.moves.urllib.parse as urlparse |
39 | 38 |
|
40 | 39 | from cinderclient._i18n import _ |
41 | 40 | from cinderclient import api_versions |
@@ -131,7 +130,7 @@ def get_server_version(url, insecure=False, cacert=None): |
131 | 130 | current_version = '2.0' |
132 | 131 | except exceptions.ClientException as e: |
133 | 132 | logger.warning("Error in server version query:%s\n" |
134 | | - "Returning APIVersion 2.0", six.text_type(e.message)) |
| 133 | + "Returning APIVersion 2.0", str(e.message)) |
135 | 134 | return (api_versions.APIVersion(min_version), |
136 | 135 | api_versions.APIVersion(current_version)) |
137 | 136 |
|
@@ -239,7 +238,7 @@ def get_volume_api_version_from_endpoint(self): |
239 | 238 | version = get_volume_api_from_url(self.get_endpoint()) |
240 | 239 | except exceptions.UnsupportedVersion as e: |
241 | 240 | msg = (_("Service catalog returned invalid url.\n" |
242 | | - "%s") % six.text_type(e)) |
| 241 | + "%s") % str(e)) |
243 | 242 | raise exceptions.UnsupportedVersion(msg) |
244 | 243 |
|
245 | 244 | return version |
@@ -496,10 +495,10 @@ def get_volume_api_version_from_endpoint(self): |
496 | 495 | except exceptions.UnsupportedVersion as e: |
497 | 496 | if self.management_url == self.os_endpoint: |
498 | 497 | msg = (_("Invalid url was specified in --os-endpoint %s") |
499 | | - % six.text_type(e)) |
| 498 | + % str(e)) |
500 | 499 | else: |
501 | 500 | msg = (_("Service catalog returned invalid url.\n" |
502 | | - "%s") % six.text_type(e)) |
| 501 | + "%s") % str(e)) |
503 | 502 |
|
504 | 503 | raise exceptions.UnsupportedVersion(msg) |
505 | 504 |
|
|
0 commit comments