Mercurial > cpython-lru_cache-weakref
diff Modules/_cursesmodule.c @ 82772:58980d0084cc 2.7
#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.
| author | R David Murray <rdmurray@bitdance.com> |
|---|---|
| date | Tue, 19 Mar 2013 16:26:53 -0400 |
| parents | b36cb4602e21 |
| children |
line wrap: on
line diff
--- a/Modules/_cursesmodule.c Tue Mar 19 13:01:05 2013 -0700 +++ b/Modules/_cursesmodule.c Tue Mar 19 16:26:53 2013 -0400 @@ -885,7 +885,9 @@ } 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);
