[issue2221] Py30a3: eval in threaded code raises SystemError

Amaury Forgeot d'Arc report at bugs.python.org
Sat Apr 5 00:57:01 CEST 2008


Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:

The problem is just that in Python/pythonrun.c, the function run_mod()
calls flush_io() after executing the code. In our testcase, there is a
pending exception.
But flush_io() silently ignore errors (which is fine), and clears all
exception info (which is bad).
To correct the problem, I it is enough to calls to
PyErr_Fetch/PyErr_Restore.

This happens only with Idle, probably because the subprocess redirected
its stdout to a pseudo-file that does not support flush().

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2221>
__________________________________


More information about the Python-bugs-list mailing list