STINNER Victor added the comment:
> This is not related to this issue. sys.stderr uses backslashreplace.
Ok, fine.
---
+ _errno = errno;
Py_END_ALLOW_THREADS
+ Py_XDECREF(bytes);
if (n < 0) {
- if (errno == EAGAIN)
+ if (_errno == EAGAIN)
Py_RETURN_NONE;
PyErr_SetFromErrno(PyExc_IOError);
---
Hum, if you expect that _errno can be modified by Py_XDECREF(bytes), you must
restore the previous errno value before calling PyErr_SetFromErrno(). This
strategy is used in Python/fileutils.c.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue25182>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com