1
0
Fork 0

Fail safe when user chooses a bad option

master v0.1
LEdoian 5 years ago
parent 952271be4a
commit 461dd8c157

@ -158,6 +158,11 @@ def user_action(hunk: Sequence[Command], context=None) -> Sequence[Command]:
return hunk
elif answer.startswith(('n', 'N')):
return []
else:
# Bad choice or error. Notify user and try again
print("Bad choice, or maybe bug.")
# No goto, use recursion
return user_action(hunk, context)

Loading…
Cancel
Save