mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
cli promt: improve coe for yes/no parsing
This commit is contained in:
parent
bd557468d3
commit
e08d0139f6
1 changed files with 3 additions and 2 deletions
|
@ -542,9 +542,10 @@ class Interface:
|
|||
elif is_multiline:
|
||||
while True:
|
||||
value = input(colorize(m18n.g("edit_text_question", message), color))
|
||||
if value in ["", "n", "N", "no", "NO"]:
|
||||
value = value.lower().strip()
|
||||
if value in ["", "n", "no"]:
|
||||
return prefill
|
||||
elif value in ['y', 'yes', 'Y', 'YES']:
|
||||
elif value in ['y', 'yes']:
|
||||
break
|
||||
|
||||
initial_message = prefill.encode('utf-8')
|
||||
|
|
Loading…
Reference in a new issue