Add status around module initialization
This commit is contained in:
parent
55d12fdf59
commit
ffe3ae76bb
20
inni/cli.py
20
inni/cli.py
|
@ -29,14 +29,18 @@ def _login_out(ctx: click.Context, login: bool):
|
||||||
prompts = config["inni"]["prompts"]
|
prompts = config["inni"]["prompts"]
|
||||||
modules = {}
|
modules = {}
|
||||||
|
|
||||||
for module_name in module_names:
|
with console.status("") as status:
|
||||||
try:
|
for module_name in module_names:
|
||||||
module = load_module(module_name)
|
status.update(f"[green]Initializing {module_name}")
|
||||||
module_config = config["modules"].get(module_name, {})
|
try:
|
||||||
modules[module_name] = module(module_config)
|
module = load_module(module_name)
|
||||||
except ModuleNotFoundError as err:
|
module_config = config["modules"].get(module_name, {})
|
||||||
error_console.print(err.msg)
|
modules[module_name] = module(module_config, console, error_console)
|
||||||
sys.exit(0)
|
except ModuleNotFoundError as err:
|
||||||
|
error_console.print(err.msg)
|
||||||
|
sys.exit(0)
|
||||||
|
console.print("[green]✅ Initialized Modules")
|
||||||
|
console.print("")
|
||||||
|
|
||||||
variables_to_prompt = []
|
variables_to_prompt = []
|
||||||
for module in modules.values():
|
for module in modules.values():
|
||||||
|
|
Loading…
Reference in New Issue