summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-05-14 01:03:14 +0000
committerVictor Stinner <victor.stinner@haypocalc.com>2010-05-14 01:03:14 +0000
commit2800759907f8c543ef9f72c65c5193f8c06f3e06 (patch)
tree63b6ead843551f5f621c3be290dc46a09e46f52a /Python/pythonrun.c
parentb3585c6c8a0a04abf08a8ca851152393f4ae8ccf (diff)
downloadcpython-2800759907f8c543ef9f72c65c5193f8c06f3e06.tar.gz
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. ........
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 1121e64db3..031d66f517 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();