diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-05-14 00:59:09 +0000 |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-05-14 00:59:09 +0000 |
commit | 5266e4236ff854c931fb0f6b958539e243da015f (patch) | |
tree | febe56dfbe1d7ca1001e801e505ba8c306629c2d /Python/pythonrun.c | |
parent | 3cb0c2d4c164167fbb69c51d848d72a5bd8931d1 (diff) | |
download | cpython-5266e4236ff854c931fb0f6b958539e243da015f.tar.gz |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index e58b1c8ab9..3031aef5f2 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(); |