diff options
author | R David Murray <rdmurray@bitdance.com> | 2013-03-19 20:26:19 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2013-03-19 20:26:19 (GMT) |
commit | af3ba4873a90b2e7e31ed01c12a40141410e9f6a (patch) | |
tree | 24a61c5bf639de646dba97fdce1fb3e019031159 /Modules | |
parent | 47bb16b0de9ff203e77be45acb65d8a35f06d085 (diff) | |
parent | 779dab9447db4a2b139270de4401c2cf8af87363 (diff) | |
download | cpython-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.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); |