1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-23 16:26:29 +00:00

cache: Treat EOFError as a negative _confirm answer

This commit is contained in:
Jonas Borgström 2015-04-15 21:35:56 +02:00
parent bbc8886bfe
commit 848666e7cb

View file

@ -70,7 +70,10 @@ def _confirm(self, message, env_var_override=None):
return True
if sys.stdin.isatty():
return False
answer = input('Do you want to continue? [yN] ')
try:
answer = input('Do you want to continue? [yN] ')
except EOFError:
return False
return answer and answer in 'Yy'
def create(self):