Issue #17209: curses.window.get_wch() now handles correctly KeyboardInterrupt (CTRL+c)

This commit is contained in:
Victor Stinner 2013-03-21 12:21:06 +01:00
parent 6bd5202227
commit bd2d30cf31
2 changed files with 6 additions and 0 deletions

View file

@ -1181,6 +1181,9 @@ PyCursesWindow_Get_WCh(PyCursesWindowObject *self, PyObject *args)
return NULL;
}
if (ct == ERR) {
if (PyErr_CheckSignals())
return NULL;
/* get_wch() returns ERR in nodelay mode */
PyErr_SetString(PyCursesError, "no input");
return NULL;