summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_cursesmodule.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
index 4e1449b..35f9fc1 100644
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -1138,7 +1138,9 @@ PyCursesWindow_GetKey(PyCursesWindowObject *self, PyObject *args)
}
if (rtn == ERR) {
/* getch() returns ERR in nodelay mode */
- PyErr_SetString(PyCursesError, "no input");
+ PyErr_CheckSignals();
+ if (!PyErr_Occurred())
+ PyErr_SetString(PyCursesError, "no input");
return NULL;
} else if (rtn<=255) {
return Py_BuildValue("C", rtn);