summaryrefslogtreecommitdiff
path: root/git_review
diff options
context:
space:
mode:
Diffstat (limited to 'git_review')
-rw-r--r--git_review/cmd.py5
-rw-r--r--git_review/tests/test_unit.py2
2 files changed, 5 insertions, 2 deletions
diff --git a/git_review/cmd.py b/git_review/cmd.py
index 566bf22..15f3121 100644
--- a/git_review/cmd.py
+++ b/git_review/cmd.py
@@ -1013,7 +1013,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)
diff --git a/git_review/tests/test_unit.py b/git_review/tests/test_unit.py
index 7dc0c0e..1bbdbff 100644
--- a/git_review/tests/test_unit.py
+++ b/git_review/tests/test_unit.py
@@ -21,9 +21,9 @@ import io
import os
import sys
import textwrap
+from unittest import mock
import fixtures
-import mock
import testtools
from git_review import cmd