[issue17244] py_compile.compile() fails to raise exceptions when writing of target file fails

Brett Cannon report at bugs.python.org
Wed Feb 27 21:00:53 CET 2013


Brett Cannon added the comment:

I figured out what I have to do to make this work properly again to avoid the exception from being swallowed. Roughly:

    # XXX calculate mode (_cache_bytecode)
    # XXX create subdirectories as necessary (set_data)
    # XXX write file (_write_atomic)
    # Above replaces loader._cache_bytecode(file, cfile, bytecode)

That will bypass the try/except block causing the issues.

----------
assignee:  -> brett.cannon
stage:  -> test needed

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


More information about the Python-bugs-list mailing list