mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
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.
This commit is contained in:
commit
779dab9447
2 changed files with 5 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue