Compare commits
2 Commits
c00ef3df9f
...
cc7d5e4de6
Author | SHA1 | Date |
---|---|---|
Ceda EI | cc7d5e4de6 | |
Ceda EI | db4bd80a94 |
|
@ -62,7 +62,7 @@ def _login_out(ctx: click.Context, login: bool):
|
||||||
variables_to_prompt.update(
|
variables_to_prompt.update(
|
||||||
module.template_variables()["login" if login else "logout"]
|
module.template_variables()["login" if login else "logout"]
|
||||||
)
|
)
|
||||||
variables_to_prompt.remove("vars")
|
variables_to_prompt -= {"vars"}
|
||||||
|
|
||||||
responses: dict[str, Any] = {
|
responses: dict[str, Any] = {
|
||||||
"vars": ctx.obj.get("vars", {}),
|
"vars": ctx.obj.get("vars", {}),
|
||||||
|
@ -74,10 +74,14 @@ def _login_out(ctx: click.Context, login: bool):
|
||||||
console.print(f"\n[green bold]Logging {'In' if login else 'Out'}\n")
|
console.print(f"\n[green bold]Logging {'In' if login else 'Out'}\n")
|
||||||
for name, module in modules.items():
|
for name, module in modules.items():
|
||||||
console.rule(f"[bold cyan]Module: {name}", align="left")
|
console.rule(f"[bold cyan]Module: {name}", align="left")
|
||||||
|
try:
|
||||||
if login:
|
if login:
|
||||||
module.login(responses)
|
module.login(responses)
|
||||||
else:
|
else:
|
||||||
module.logout(responses)
|
module.logout(responses)
|
||||||
|
except Exception:
|
||||||
|
error_console.print(f"[red bold]Fatal error occured running module {name}")
|
||||||
|
error_console.print_exception()
|
||||||
|
|
||||||
|
|
||||||
@inni.command()
|
@inni.command()
|
||||||
|
|
Loading…
Reference in New Issue