diff options
author | R David Murray <rdmurray@bitdance.com> | 2013-03-19 20:24:35 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2013-03-19 20:24:35 (GMT) |
commit | 779dab9447db4a2b139270de4401c2cf8af87363 (patch) | |
tree | 45f7eb3b69045714686c73c7183cca55fc23b48b /Modules/_cursesmodule.c | |
parent | 7889944b83cf04cefb45cd658644298218eac5db (diff) | |
parent | f5d7cc239e61e063e7bab783d55deb8e72210674 (diff) | |
download | cpython-779dab9447db4a2b139270de4401c2cf8af87363.zip cpython-779dab9447db4a2b139270de4401c2cf8af87363.tar.gz cpython-779dab9447db4a2b139270de4401c2cf8af87363.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/_cursesmodule.c')
-rw-r--r-- | Modules/_cursesmodule.c | 4 |
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); |