diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-03-21 12:21:43 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-03-21 12:21:43 +0100 |
commit | d06b35c1b6ef9e49c455bb4e163ce056bf80d073 (patch) | |
tree | 2cc8ca9fa444b958d2dac31df749ef03667a1874 | |
parent | e0a1bf313ff89519dc0e318e42fc8fdb174e1a86 (diff) | |
parent | bd2d30cf31c61843645a96a377aa0573052c4972 (diff) | |
download | cpython-git-d06b35c1b6ef9e49c455bb4e163ce056bf80d073.tar.gz |
(Merge 3.3) Issue #17209: curses.window.get_wch() now handles correctly KeyboardInterrupt (CTRL+c)
-rw-r--r-- | Misc/NEWS | 3 | ||||
-rw-r--r-- | Modules/_cursesmodule.c | 3 |
2 files changed, 6 insertions, 0 deletions
@@ -292,6 +292,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. diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index 35f9fc15da..8436f03eee 100644 --- a/Modules/_cursesmodule.c +++ b/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; |