[New-bugs-announce] [issue8124] mywrite() ignores PyFile_WriteString() errors

STINNER Victor report at bugs.python.org
Fri Mar 12 17:08:39 CET 2010


New submission from STINNER Victor <victor.stinner at haypocalc.com>:

PyFile_WriteString() calls PyObject_Str() which calls PyErr_CheckSignals(). If a signal was catched, the signal handler is called. If the signal handler raises an error, PyObject_Str() and then PyFile_WriteString() return NULL.

mywrite() ignores all PyFile_WriteString() errors. It should maybe only ignores errors from the file (except IOError: ...) and not any error.

Another problem: mywrite() is called from PySys_WriteStdout() and PySys_WriteStderr() which are procedures. PySys_WriteStdout()/PySys_WriteStderr() caller cannot detect the error. There are 65 calls to PySys_WriteStd...

----------
components: Interpreter Core
messages: 100939
nosy: haypo
severity: normal
status: open
title: mywrite() ignores PyFile_WriteString() errors
type: behavior
versions: Python 3.1, Python 3.2

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


More information about the New-bugs-announce mailing list