From d42a81f6c219e70b1ba0317745451cb83f373978 Mon Sep 17 00:00:00 2001 From: Gabis Bandeira Date: Tue, 13 Feb 2024 18:51:06 -0300 Subject: [PATCH] fixed when typing any key when answering default config --- apply-terminator.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/apply-terminator.py b/apply-terminator.py index 857222e9..becfc7f2 100755 --- a/apply-terminator.py +++ b/apply-terminator.py @@ -43,11 +43,14 @@ def choose_profile(): if profile_answer.lower() in ['', 'default']: profile_answer = 'default' else: - copy_default_config_answer = input("Do you want to copy your config from default profile? [Y]: (Y/N) ") - if copy_default_config_answer.lower() in ['', 'yes', 'y']: - copy_default_config_answer = 'yes' - else: - copy_default_config_answer = 'no' + while True: + copy_default_config_answer = input("Do you want to copy your config from default profile? [Y]: (Y/N) ") + if copy_default_config_answer.lower() in ['', 'yes', 'y']: + copy_default_config_answer = 'yes' + break + elif copy_default_config_answer.lower() in ['no', 'n']: + copy_default_config_answer = 'no' + break return {"profile": profile_answer, "copy_default_config": copy_default_config_answer}