diff options
author | Martin Panter <vadmium+py@gmail.com> | 2015-10-10 01:55:23 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2015-10-10 01:55:23 (GMT) |
commit | e02f8fc44d59886c00d5444ca557a38a9bed2eac (patch) | |
tree | ab1666de99606e0c9fe3e9472e6f0f4c0004de99 /Python | |
parent | 09a00eb07673a122c09404c7bc32899a8093f6c3 (diff) | |
parent | c9a6ab56cfae90c96c1361314c3c99b32e114446 (diff) | |
download | cpython-e02f8fc44d59886c00d5444ca557a38a9bed2eac.zip cpython-e02f8fc44d59886c00d5444ca557a38a9bed2eac.tar.gz cpython-e02f8fc44d59886c00d5444ca557a38a9bed2eac.tar.bz2 |
Issue #24402: Merge input() fix from 3.4 into 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 2f22209..7f7d051 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -1853,8 +1853,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); |