diff options
Diffstat (limited to 'onap-client/onap_client/client/clients.py')
-rw-r--r-- | onap-client/onap_client/client/clients.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/onap-client/onap_client/client/clients.py b/onap-client/onap_client/client/clients.py index 0c4605f..9b7a0c6 100644 --- a/onap-client/onap_client/client/clients.py +++ b/onap-client/onap_client/client/clients.py @@ -79,7 +79,9 @@ def import_submodules(package, recursive=True): results = {} for loader, name, is_pkg in pkgutil.walk_packages(package.__path__): full_name = package.__name__ + "." + name - results[full_name] = importlib.import_module(full_name) - if recursive and is_pkg and full_name.find("tests") == -1: - results.update(import_submodules(full_name)) + if full_name.find("tests") == -1: + results[full_name] = importlib.import_module(full_name) + if recursive and is_pkg: + results.update(import_submodules(full_name)) + return results |