[Python-checkins] r81157 - in python/branches/release31-maint: Python/pythonrun.c
victor.stinner
python-checkins at python.org
Fri May 14 03:03:14 CEST 2010
Author: victor.stinner
Date: Fri May 14 03:03:14 2010
New Revision: 81157
Log:
Merged revisions 81156 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r81156 | victor.stinner | 2010-05-14 02:59:09 +0200 (ven., 14 mai 2010) | 5 lines
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/release31-maint/ (props changed)
python/branches/release31-maint/Python/pythonrun.c
Modified: python/branches/release31-maint/Python/pythonrun.c
==============================================================================
--- python/branches/release31-maint/Python/pythonrun.c (original)
+++ python/branches/release31-maint/Python/pythonrun.c Fri May 14 03:03:14 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