mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
Issue #24402: Merge input() fix from 3.4 into 3.5
This commit is contained in:
commit
e02f8fc44d
3 changed files with 116 additions and 77 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue