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:
parent
bbc8886bfe
commit
848666e7cb
1 changed files with 4 additions and 1 deletions
|
@ -70,7 +70,10 @@ def _confirm(self, message, env_var_override=None):
|
||||||
return True
|
return True
|
||||||
if sys.stdin.isatty():
|
if sys.stdin.isatty():
|
||||||
return False
|
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'
|
return answer and answer in 'Yy'
|
||||||
|
|
||||||
def create(self):
|
def create(self):
|
||||||
|
|
Loading…
Reference in a new issue