Issue #17619: Make input() check for Ctrl-C correctly on Windows.

This commit is contained in:
Richard Oudkerk 2013-04-03 13:44:50 +01:00
parent d8a46969f7
commit 614c578dec
2 changed files with 3 additions and 0 deletions

View file

@ -1733,6 +1733,7 @@ builtin_input(PyObject *self, PyObject *args)
}
s = PyOS_Readline(stdin, stdout, prompt);
if (s == NULL) {
PyErr_CheckSignals();
if (!PyErr_Occurred())
PyErr_SetNone(PyExc_KeyboardInterrupt);
goto _readline_errors;