diff options
Diffstat (limited to 'keystone/openstack/common/importutils.py')
-rw-r--r-- | keystone/openstack/common/importutils.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/keystone/openstack/common/importutils.py b/keystone/openstack/common/importutils.py index 3bd277f4..7a303f93 100644 --- a/keystone/openstack/common/importutils.py +++ b/keystone/openstack/common/importutils.py @@ -24,7 +24,7 @@ import traceback def import_class(import_str): - """Returns a class from a string including module and class""" + """Returns a class from a string including module and class.""" mod_str, _sep, class_str = import_str.rpartition('.') try: __import__(mod_str) @@ -41,8 +41,9 @@ def import_object(import_str, *args, **kwargs): def import_object_ns(name_space, import_str, *args, **kwargs): - """ - Import a class and return an instance of it, first by trying + """Tries to import object from default namespace. + + Imports a class and return an instance of it, first by trying to find the class in a default namespace, then failing back to a full path if not found in the default namespace. """ |