summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cinderclient/client.py3
-rw-r--r--cinderclient/utils.py7
2 files changed, 1 insertions, 9 deletions
diff --git a/cinderclient/client.py b/cinderclient/client.py
index 9e93b67..75cd210 100644
--- a/cinderclient/client.py
+++ b/cinderclient/client.py
@@ -30,7 +30,6 @@ import requests
from cinderclient import exceptions
from cinderclient.openstack.common import importutils
from cinderclient.openstack.common import strutils
-from cinderclient import utils
osprofiler_web = importutils.try_import("osprofiler.web")
@@ -526,7 +525,7 @@ def get_client_class(version):
(version, ', '.join(version_map)))
raise exceptions.UnsupportedVersion(msg)
- return utils.import_class(client_path)
+ return importutils.import_class(client_path)
def Client(version, *args, **kwargs):
diff --git a/cinderclient/utils.py b/cinderclient/utils.py
index 876ed77..fcf9f68 100644
--- a/cinderclient/utils.py
+++ b/cinderclient/utils.py
@@ -249,13 +249,6 @@ def safe_issubclass(*args):
return False
-def import_class(import_str):
- """Returns a class from a string including module and class."""
- mod_str, _sep, class_str = import_str.rpartition('.')
- __import__(mod_str)
- return getattr(sys.modules[mod_str], class_str)
-
-
def _load_entry_point(ep_name, name=None):
"""Try to load the entry point ep_name that matches name."""
for ep in pkg_resources.iter_entry_points(ep_name, name=name):