summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-03-21 11:21:43 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-03-21 11:21:43 (GMT)
commitd06b35c1b6ef9e49c455bb4e163ce056bf80d073 (patch)
tree2cc8ca9fa444b958d2dac31df749ef03667a1874 /Modules
parente0a1bf313ff89519dc0e318e42fc8fdb174e1a86 (diff)
parentbd2d30cf31c61843645a96a377aa0573052c4972 (diff)
downloadcpython-d06b35c1b6ef9e49c455bb4e163ce056bf80d073.zip
cpython-d06b35c1b6ef9e49c455bb4e163ce056bf80d073.tar.gz
cpython-d06b35c1b6ef9e49c455bb4e163ce056bf80d073.tar.bz2
(Merge 3.3) Issue #17209: curses.window.get_wch() now handles correctly KeyboardInterrupt (CTRL+c)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_cursesmodule.c3
1 files changed, 3 insertions, 0 deletions
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;