summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2022-04-11 05:18:26 +0000
committerGerrit Code Review <review@openstack.org>2022-04-11 05:18:26 +0000
commitbb58ee198cffaedb5e16fd1220996a9d331d2b4c (patch)
tree1745ee012f3dd3c282667a168764db31d02d63a1
parent1912e685ffbd93182a32d29219bd19ce49f39c63 (diff)
parent8cbd515e0c1a4b9d30aed7089ce64c79c1bda6e7 (diff)
downloadgit-review-bb58ee198cffaedb5e16fd1220996a9d331d2b4c.tar.gz
Merge "Treat ^C as "no" at confirmation prompt"
-rw-r--r--git_review/cmd.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/git_review/cmd.py b/git_review/cmd.py
index 9215b5d..fe20c99 100644
--- a/git_review/cmd.py
+++ b/git_review/cmd.py
@@ -1005,7 +1005,10 @@ def assert_one_change(remote, branch, yes, have_hook):
"branches (for independent changes).")
print("\nThe outstanding commits are:\n\n%s\n\n"
"Do you really want to submit the above commits?" % output)
- yes_no = input("Type 'yes' to confirm, other to cancel: ")
+ try:
+ yes_no = input("Type 'yes' to confirm, other to cancel: ")
+ except KeyboardInterrupt:
+ yes_no = "no"
if yes_no.lower().strip() != "yes":
print("Aborting.")
sys.exit(1)