[issue5321] I/O error during one-liner gives no (!) diagnostic (and fails to return OS error status)

Stefan Krah report at bugs.python.org
Fri Jul 9 22:31:18 CEST 2010


Stefan Krah <stefan-usenet at bytereef.org> added the comment:

It looks like the error is cleared in Python/pythonrun.c, line 321:

    if (fout != NULL && fout != Py_None) {
        tmp = PyObject_CallMethod(fout, "flush", "");
        if (tmp == NULL)
            PyErr_Clear();
        else
            Py_DECREF(tmp);
    }


Not sure why it isn't handled before that.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5321>
_______________________________________


More information about the Python-bugs-list mailing list