From 848666e7cbf62cd18efbab2842f5df8ecd7ce23a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Borgstr=C3=B6m?= Date: Wed, 15 Apr 2015 21:35:56 +0200 Subject: [PATCH] cache: Treat EOFError as a negative _confirm answer --- attic/cache.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/attic/cache.py b/attic/cache.py index edebb2bf2..3e0e50e08 100644 --- a/attic/cache.py +++ b/attic/cache.py @@ -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):