Skip to content

Commit c344f92

Browse files
add ability to init generic piface during config if it does not exist
1 parent 09c0665 commit c344f92

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

looper/utils.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,8 +672,20 @@ def looper_config_tutorial():
672672

673673
if not os.path.exists(piface_path):
674674
console.print(
675-
f"[bold red]Warning:[/bold red] File does not exist at [yellow]{piface_path}[/yellow]\nUse command [yellow]`looper init_piface`[/yellow] to create a generic pipeline interface."
675+
f"[bold red]Warning:[/bold red] File does not exist at [yellow]{piface_path}[/yellow]"
676676
)
677+
console.print(
678+
"Do you wish to initialize a generic pipeline interface? [bold green]Y[/bold green]/[red]n[/red]..."
679+
)
680+
selection = None
681+
while selection not in ["y", "n"]:
682+
selection = console.input("\nSelection: ").lower().strip()
683+
if selection == "n":
684+
console.print(
685+
"Use command [yellow]`looper init_piface`[/yellow] to create a generic pipeline interface."
686+
)
687+
if selection == "y":
688+
init_generic_pipeline()
677689

678690
console.print(f"Writing config file to [yellow]{looper_cfg_path}[/yellow]")
679691

0 commit comments

Comments
 (0)