[Python-checkins] cpython (merge 3.3 -> default): (Merge 3.3) Issue #17209: curses.window.get_wch() now handles correctly
victor.stinner
python-checkins at python.org
Thu Mar 21 12:21:55 CET 2013
http://hg.python.org/cpython/rev/b9d9bba9dfe5
changeset: 82868:b9d9bba9dfe5
parent: 82866:fcef6a33de17
parent: 82867:d98a515489db
user: Victor Stinner <victor.stinner at gmail.com>
date: Thu Mar 21 12:21:43 2013 +0100
summary:
(Merge 3.3) Issue #17209: curses.window.get_wch() now handles correctly KeyboardInterrupt (CTRL+c)
files:
Misc/NEWS | 3 +++
Modules/_cursesmodule.c | 3 +++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -292,6 +292,9 @@
Library
-------
+- Issue #17209: curses.window.get_wch() now handles correctly KeyboardInterrupt
+ (CTRL+c).
+
- Issue #5713: smtplib now handles 421 (closing connection) error codes when
sending mail by closing the socket and reporting the 421 error code via the
exception appropriate to the command that received the error response.
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -1181,6 +1181,9 @@
return NULL;
}
if (ct == ERR) {
+ if (PyErr_CheckSignals())
+ return NULL;
+
/* get_wch() returns ERR in nodelay mode */
PyErr_SetString(PyCursesError, "no input");
return NULL;
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list