summaryrefslogtreecommitdiff
path: root/pykolab/utils.py
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2010-10-25 14:27:06 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2010-10-25 14:27:06 (GMT)
commit9c4499cbb60a45e6086a0ba5c3102b2e6c256cad (patch)
tree0745b87be27a78721546f8045464341eb590320e /pykolab/utils.py
parent6e8f6623668d0f0e77ad7094941bfa10bfe1ecba (diff)
downloadpykolab-9c4499cbb60a45e6086a0ba5c3102b2e6c256cad.tar.gz
Explain what utils.ask_confirmation() is all about
Diffstat (limited to 'pykolab/utils.py')
-rw-r--r--pykolab/utils.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pykolab/utils.py b/pykolab/utils.py
index 4540fcd..b6b969c 100644
--- a/pykolab/utils.py
+++ b/pykolab/utils.py
@@ -21,6 +21,12 @@ def ask_question(question, default="", password=False):
return answer
def ask_confirmation(question, default="y", all_inclusive_no=True):
+ """
+ Create a confirmation dialog, including a default option (capitalized),
+ and a "yes" or "no" parsing that can either require an explicit, full
+ "yes" or "no", or take the default or any YyNn answer.
+ """
+
if default in [ "y", "Y" ]:
default_answer = True
default_no = "n"