summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-05-14 00:59:09 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-05-14 00:59:09 (GMT)
commit9467b212f5dd4558443d03584e1ed9bca5a2b780 (patch)
treeeb36850bd6cd4c27b7e56c08984caa1ee85da000 /Python
parent84df1e6c2194f30505cbeb8591bcc8dc8205ce48 (diff)
downloadcpython-9467b212f5dd4558443d03584e1ed9bca5a2b780.zip
cpython-9467b212f5dd4558443d03584e1ed9bca5a2b780.tar.gz
cpython-9467b212f5dd4558443d03584e1ed9bca5a2b780.tar.bz2
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')
-rw-r--r--Python/pythonrun.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index e58b1c8..3031aef 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();