Prevent printing stack trace in compose mode on ctrl+c.

This commit is contained in:
Jonathon Scanes 2014-06-26 08:45:58 +10:00
parent fa886151f6
commit b0fe7cd330

View file

@ -81,7 +81,10 @@ def py23_input(msg=""):
def py23_read(msg=""):
STDERR.write(u(msg))
return STDIN.read()
try:
return STDIN.read()
except KeyboardInterrupt:
sys.exit(0)
def yesno(prompt, default=True):
prompt = prompt.strip() + (" [Y/n]" if default else " [y/N]")