]> granicus.if.org Git - python/commitdiff
Merged revisions 81156 via svnmerge from
authorVictor Stinner <victor.stinner@haypocalc.com>
Fri, 14 May 2010 01:03:14 +0000 (01:03 +0000)
committerVictor Stinner <victor.stinner@haypocalc.com>
Fri, 14 May 2010 01:03:14 +0000 (01:03 +0000)
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

index 1121e64db359f9f22b1f4fdbf5004895bdaaeb24..031d66f51796f47e1a5fe3fd4e90e558c24bfa75 100644 (file)
@@ -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();