diff options
author | Martin Panter <vadmium+py@gmail.com> | 2015-10-10 02:09:41 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2015-10-10 02:09:41 (GMT) |
commit | 5344da5c0d9ff35976b133c665329584a82b4098 (patch) | |
tree | bd646167e65e64a6734fe40c8bb0c48e02ccc666 /Python | |
parent | 748cf9b66e4343a248f19fd6322c6329b6c7013d (diff) | |
parent | e02f8fc44d59886c00d5444ca557a38a9bed2eac (diff) | |
download | cpython-5344da5c0d9ff35976b133c665329584a82b4098.zip cpython-5344da5c0d9ff35976b133c665329584a82b4098.tar.gz cpython-5344da5c0d9ff35976b133c665329584a82b4098.tar.bz2 |
Issue #24402: Merge input() fix from 3.5
Diffstat (limited to 'Python')
-rw-r--r-- | Python/bltinmodule.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 3c8f1e9..3b70718 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -1854,8 +1854,10 @@ builtin_input_impl(PyModuleDef *module, PyObject *prompt) } if (tty) { tmp = _PyObject_CallMethodId(fout, &PyId_fileno, ""); - if (tmp == NULL) + if (tmp == NULL) { PyErr_Clear(); + tty = 0; + } else { fd = PyLong_AsLong(tmp); Py_DECREF(tmp); |