From ebb5a88fd6d42fdcbddeaa74c976bffc7fbc0e32 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 14 May 2010 01:03:14 +0000 Subject: 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. ........ --- Python/pythonrun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 1121e64..031d66f 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -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(); -- cgit v0.12