From 48a6be4eb0be83365edf709dc2f2172789826ed7 Mon Sep 17 00:00:00 2001 From: Daniel Skinstad Drabitzius Date: Wed, 8 Nov 2023 12:12:24 +0100 Subject: [PATCH 1/2] Fixed typo in prompts.py Signed-off-by: Daniel Skinstad Drabitzius --- cfbs/prompts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 8fc385724a7772128cd63503d9b5c1aa4c27231a Mon Sep 17 00:00:00 2001 From: Daniel Skinstad Drabitzius Date: Wed, 8 Nov 2023 12:18:24 +0100 Subject: [PATCH 2/2] The prompt for adding all modules now has yes/y/no/n options, like the other prompts Ticket: ENT-8980 Signed-off-by: Daniel Skinstad Drabitzius --- cfbs/cfbs_config.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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