diff --git a/cfbs/cfbs_config.py b/cfbs/cfbs_config.py index 826b1d08..c9cbc175 100644 --- a/cfbs/cfbs_config.py +++ b/cfbs/cfbs_config.py @@ -137,8 +137,11 @@ def _add_using_url( if not any(modules): user_error("no modules available, nothing to do") if not self.non_interactive: - answer = input( - "Do you want to add all %d of them? [y/N] " % (len(modules)) + answer = prompt_user( + non_interactive=self.non_interactive, + prompt="Do you want to add all %d of them?" % (len(modules)), + choices=YES_NO_CHOICES, + default="no", ) if answer.lower() not in ("y", "yes"): return diff --git a/cfbs/prompts.py b/cfbs/prompts.py index c5cfe904..d4e9a031 100644 --- a/cfbs/prompts.py +++ b/cfbs/prompts.py @@ -34,7 +34,7 @@ def prompt_user(non_interactive, prompt, choices=None, default=None): if answer == "": answer = default elif choices and answer not in choices and answer.lower() not in choices: - print("Invalid value entered, must ve one of: %s" % "/".join(choices)) + print("Invalid value entered, must be one of: %s" % "/".join(choices)) answer = None return answer