summaryrefslogtreecommitdiff
path: root/Modules/_cursesmodule.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-03-21 12:21:06 +0100
committerVictor Stinner <victor.stinner@gmail.com>2013-03-21 12:21:06 +0100
commitbd2d30cf31c61843645a96a377aa0573052c4972 (patch)
tree659ec513f41f91e980dd5ccb9af2c0744deed5d6 /Modules/_cursesmodule.c
parent6bd5202227f228292a94bbed21bbcbf3eb73d1b1 (diff)
downloadcpython-git-bd2d30cf31c61843645a96a377aa0573052c4972.tar.gz
Issue #17209: curses.window.get_wch() now handles correctly KeyboardInterrupt (CTRL+c)
Diffstat (limited to 'Modules/_cursesmodule.c')
-rw-r--r--Modules/_cursesmodule.c3
1 files changed, 3 insertions, 0 deletions
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;