[issue7732] imp.find_module crashes Python if there exists a directory named "__init__.py"
STINNER Victor
report at bugs.python.org
Mon Jun 20 15:59:11 CEST 2011
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
pyfile_fromfile_close.patch: patch based on issue7732_find_module_v2.diff, fixing this issue in Python 2.7
- PyFile_FromFile() closes the file on PyString_FromString() failure (note: unlikely failure)
- call_find_module() doesn't close the file anymore, PyFile_FromFile() closes already the file on failure (e.g. if the path is a directory)
- update PyFile_FromFile() doc to simplify that the file is closed on error
----------
Added file: http://bugs.python.org/file22416/pyfile_fromfile_close.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7732>
_______________________________________
More information about the Python-bugs-list
mailing list