Skip to content

Commit bf2ce95

Browse files
committed
Replaced 'exit() in 'set_up_machine_config' with 'return'.
1 parent 92a57df commit bf2ce95

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/murfey/cli/generate_config.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -549,8 +549,8 @@ def set_up_machine_config(debug: bool = False):
549549
console.print(f"{error}", style="red")
550550
# Offer to redo the setup, otherwise quit setup
551551
if ask_for_input("machine configuration", True) is True:
552-
return run()
553-
exit()
552+
return set_up_machine_config(debug)
553+
return False
554554

555555
# Save config under its instrument name
556556
master_config: dict[str, dict] = {
@@ -578,7 +578,7 @@ def set_up_machine_config(debug: bool = False):
578578
console.print(error, style="red")
579579
# Provide option to quit or try again
580580
if ask_for_input("machine configuration", True) is True:
581-
return run()
581+
return set_up_machine_config(debug)
582582
console.print("Exiting machine configuration setup guide")
583583
exit()
584584
# Check if settings already exist for this machine
@@ -602,9 +602,9 @@ def set_up_machine_config(debug: bool = False):
602602

603603
# Provide option to set up another machine configuration
604604
if ask_for_input("machine configuration", True) is True:
605-
return run()
605+
return set_up_machine_config(debug)
606606
console.print("Exiting machine configuration setup guide", style="bright_green")
607-
exit()
607+
return True
608608

609609

610610
def run():
@@ -618,5 +618,3 @@ def run():
618618
args = parser.parse_args()
619619

620620
set_up_machine_config(args.debug)
621-
622-
pass

0 commit comments

Comments
 (0)