From cc14ac4a46e3c17b380b8740c1a0553f50bf3bfa Mon Sep 17 00:00:00 2001 From: Alex Grintsvayg Date: Tue, 25 Apr 2017 16:56:07 -0400 Subject: [PATCH] catch ctrl-c on confirm --- build/release.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build/release.py b/build/release.py index ae7cbc0a7..c67d873b1 100644 --- a/build/release.py +++ b/build/release.py @@ -156,7 +156,10 @@ in the future""" def confirm(): - return raw_input('Is this what you want? [y/N] ').strip().lower() == 'y' + try: + return raw_input('Is this what you want? [y/N] ').strip().lower() == 'y' + except KeyboardInterrupt: + return False def run_sanity_checks(repo, branch):