summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2013-03-19 20:26:19 (GMT)
committerR David Murray <rdmurray@bitdance.com>2013-03-19 20:26:19 (GMT)
commitaf3ba4873a90b2e7e31ed01c12a40141410e9f6a (patch)
tree24a61c5bf639de646dba97fdce1fb3e019031159 /Modules
parent47bb16b0de9ff203e77be45acb65d8a35f06d085 (diff)
parent779dab9447db4a2b139270de4401c2cf8af87363 (diff)
downloadcpython-af3ba4873a90b2e7e31ed01c12a40141410e9f6a.zip
cpython-af3ba4873a90b2e7e31ed01c12a40141410e9f6a.tar.gz
cpython-af3ba4873a90b2e7e31ed01c12a40141410e9f6a.tar.bz2
Merge: #8862: Fix curses cleanup with getchar is interrupted by a signal.
I have no idea how one would write a test for this. Patch by July Tikhonov.
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);