Treat ^C as "no" at confirmation prompt
The user intent is clear. Change-Id: Ibdaa2f95e7417619f651d6f41fbf15a357839bf3
This commit is contained in:
		| @@ -968,7 +968,10 @@ def assert_one_change(remote, branch, yes, have_hook): | |||||||
|                       "branches (for independent changes).") |                       "branches (for independent changes).") | ||||||
|             print("\nThe outstanding commits are:\n\n%s\n\n" |             print("\nThe outstanding commits are:\n\n%s\n\n" | ||||||
|                   "Do you really want to submit the above commits?" % output) |                   "Do you really want to submit the above commits?" % output) | ||||||
|  |             try: | ||||||
|                 yes_no = input("Type 'yes' to confirm, other to cancel: ") |                 yes_no = input("Type 'yes' to confirm, other to cancel: ") | ||||||
|  |             except KeyboardInterrupt: | ||||||
|  |                 yes_no = "no" | ||||||
|             if yes_no.lower().strip() != "yes": |             if yes_no.lower().strip() != "yes": | ||||||
|                 print("Aborting.") |                 print("Aborting.") | ||||||
|                 sys.exit(1) |                 sys.exit(1) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Tim Burke
					Tim Burke