]> granicus.if.org Git - python/commitdiff
Issue #17619: Make input() check for Ctrl-C correctly on Windows.
authorRichard Oudkerk <shibturn@gmail.com>
Wed, 3 Apr 2013 12:44:50 +0000 (13:44 +0100)
committerRichard Oudkerk <shibturn@gmail.com>
Wed, 3 Apr 2013 12:44:50 +0000 (13:44 +0100)
Misc/NEWS
Python/bltinmodule.c

index 621cdaa7e47dc41c3b913fd4c4d6e2570a5604ea..da04b0ee52c730580a1ee947e178be2a182410a0 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,8 @@ What's New in Python 3.3.2?
 Core and Builtins
 -----------------
 
+- Issue #17619: Make input() check for Ctrl-C correctly on Windows.
+
 - Issue #17610: Don't rely on non-standard behavior of the C qsort() function.
 
 - Issue #17357: Add missing verbosity output when using -v/-vv.
index bf90aba3a24e34d2a2af737d8c44d9cb4635f8aa..75afa860f159f932dd10ffd4f0463b6abf9a7f7e 100644 (file)
@@ -1733,6 +1733,7 @@ builtin_input(PyObject *self, PyObject *args)
         }
         s = PyOS_Readline(stdin, stdout, prompt);
         if (s == NULL) {
+            PyErr_CheckSignals();
             if (!PyErr_Occurred())
                 PyErr_SetNone(PyExc_KeyboardInterrupt);
             goto _readline_errors;