diff --git a/leapp/snactor/__init__.py b/leapp/snactor/__init__.py index 22ea99371..7ffc40144 100644 --- a/leapp/snactor/__init__.py +++ b/leapp/snactor/__init__.py @@ -30,7 +30,9 @@ def _load_commands_from(path): for importer, name, is_pkg in pkgutil.iter_modules([pkg_path]): if is_pkg: continue - mod = importer.find_module(name).load_module(name) + spec = importer.find_spec(name) + mod = importlib.util.module_from_spec(spec) + #sys.modules[name] = module if hasattr(mod.cli, 'command'): if not mod.cli.command.parent: cli.command.add_sub(mod.cli.command)