diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-03-21 11:21:06 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-03-21 11:21:06 (GMT) |
commit | bd2d30cf31c61843645a96a377aa0573052c4972 (patch) | |
tree | 659ec513f41f91e980dd5ccb9af2c0744deed5d6 | |
parent | 6bd5202227f228292a94bbed21bbcbf3eb73d1b1 (diff) | |
download | cpython-bd2d30cf31c61843645a96a377aa0573052c4972.zip cpython-bd2d30cf31c61843645a96a377aa0573052c4972.tar.gz cpython-bd2d30cf31c61843645a96a377aa0573052c4972.tar.bz2 |
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
@@ -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. diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index 35f9fc1..8436f03 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; |