Commit 9467b212 authored by Victor Stinner's avatar Victor Stinner

Issue #4653: fix typo in flush_std_files()

Don't call sys.stderr.flush() if sys has no stderr attribute or if
sys.stderr==None.
parent 84df1e6c
......@@ -334,7 +334,7 @@ flush_std_files(void)
Py_DECREF(tmp);
}
if (ferr != NULL || ferr != Py_None) {
if (ferr != NULL && ferr != Py_None) {
tmp = PyObject_CallMethod(ferr, "flush", "");
if (tmp == NULL)
PyErr_Clear();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment