[Python-checkins] r81156 - python/branches/py3k/Python/pythonrun.c
victor.stinner
python-checkins at python.org
Fri May 14 02:59:09 CEST 2010
Author: victor.stinner
Date: Fri May 14 02:59:09 2010
New Revision: 81156
Log:
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.
Modified:
python/branches/py3k/Python/pythonrun.c
Modified: python/branches/py3k/Python/pythonrun.c
==============================================================================
--- python/branches/py3k/Python/pythonrun.c (original)
+++ python/branches/py3k/Python/pythonrun.c Fri May 14 02:59:09 2010
@@ -334,7 +334,7 @@
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();
More information about the Python-checkins
mailing list