# HG changeset patch # User Marcin Kuzminski # Date 2016-07-26 22:37:32 # Node ID 8e95875b24d8418cd923a8edf8e3a423f149693e # Parent 669c5d5564f22a562ec5518f4bb182faae1cfa3d setup: improve support for prompts, we should not take care of case sensitivity here diff --git a/rhodecode/lib/utils.py b/rhodecode/lib/utils.py --- a/rhodecode/lib/utils.py +++ b/rhodecode/lib/utils.py @@ -352,17 +352,17 @@ def is_valid_repo_group(repo_group_name, return False -def ask_ok(prompt, retries=4, complaint='Yes or no please!'): +def ask_ok(prompt, retries=4, complaint='[y]es or [n]o please!'): while True: ok = raw_input(prompt) - if ok in ('y', 'ye', 'yes'): + if ok.lower() in ('y', 'ye', 'yes'): return True - if ok in ('n', 'no', 'nop', 'nope'): + if ok.lower() in ('n', 'no', 'nop', 'nope'): return False retries = retries - 1 if retries < 0: raise IOError - print complaint + print(complaint) # propagated from mercurial documentation ui_sections = [