mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
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.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user