From 480e1a098ae3977e09a6d4134232b31b97c5bbb2 Mon Sep 17 00:00:00 2001 From: Martin Kosek Date: Wed, 7 Mar 2012 18:51:04 +0100 Subject: Ignore case in yes/no prompts We did not accept answers like "Yes", "YES", "No", etc. as valid answers to yes/no prompts (used for example in dnsrecord-del interactive mode). This could confuse users. This patch changes the behavior to ignore the answer case. https://fedorahosted.org/freeipa/ticket/2484 --- ipalib/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ipalib/cli.py') diff --git a/ipalib/cli.py b/ipalib/cli.py index 737ae001..7af63761 100644 --- a/ipalib/cli.py +++ b/ipalib/cli.py @@ -574,7 +574,7 @@ class textui(backend.Backend): prompt = u'%s Yes/No: ' % label while True: - data = self.prompt_helper(prompt, label) + data = self.prompt_helper(prompt, label).lower() #pylint: disable=E1103 if data in (u'yes', u'y'): return True -- cgit