mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
#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:
parent
fcb6d6a3b3
commit
f5d7cc239e
2 changed files with 5 additions and 1 deletions
|
@ -233,6 +233,8 @@ Core and Builtins
|
|||
Library
|
||||
-------
|
||||
|
||||
- Issue #8862: Fixed curses cleanup when getkey is interrputed by a signal.
|
||||
|
||||
- Issue #17443: impalib.IMAP4_stream was using the default unbuffered IO
|
||||
in subprocess, but the imap code assumes buffered IO. In Python2 this
|
||||
worked by accident. IMAP4_stream now explicitly uses buffered IO.
|
||||
|
|
|
@ -895,7 +895,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