Browse Source

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

pull/2332/head
Victor Stinner 13 years ago
parent
commit
bd2d30cf31
  1. 3
      Misc/NEWS
  2. 3
      Modules/_cursesmodule.c

3
Misc/NEWS

@ -196,6 +196,9 @@ Core and Builtins
Library
-------
- Issue #17209: curses.window.get_wch() now handles correctly KeyboardInterrupt
(CTRL+c).
- Issue #5713: smtplib now handles 421 (closing connection) error codes when
sending mail by closing the socket and reporting the 421 error code via the
exception appropriate to the command that received the error response.

3
Modules/_cursesmodule.c

@ -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;

Loading…
Cancel
Save