cli: Y/n instead of y/n

This commit is contained in:
tretrauit 2023-06-20 18:51:21 +07:00
parent 0d52b53172
commit a3a6cfdbe3

View File

@ -6,8 +6,8 @@ def ask(question: str):
print(question + " [Y/n] Y")
return True
while True:
answer = input(question + " [y/n] ")
if answer.lower() in ["y", "yes"]:
answer = input(question + " [Y/n] ")
if answer.lower().strip() in ["y", "yes", ""]:
return True
# Pacman way, treat all other answers as no
else: