cli: Y/n instead of y/n
This commit is contained in:
parent
0d52b53172
commit
a3a6cfdbe3
@ -6,8 +6,8 @@ def ask(question: str):
|
|||||||
print(question + " [Y/n] Y")
|
print(question + " [Y/n] Y")
|
||||||
return True
|
return True
|
||||||
while True:
|
while True:
|
||||||
answer = input(question + " [y/n] ")
|
answer = input(question + " [Y/n] ")
|
||||||
if answer.lower() in ["y", "yes"]:
|
if answer.lower().strip() in ["y", "yes", ""]:
|
||||||
return True
|
return True
|
||||||
# Pacman way, treat all other answers as no
|
# Pacman way, treat all other answers as no
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user