summaryrefslogtreecommitdiffstats
path: root/pykolab/utils.py
diff options
context:
space:
mode:
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"