[issue13848] io.open() doesn't check for embedded NUL characters
report at bugs.python.org
Tue Jan 24 14:20:50 CET 2012
Antoine Pitrou <pitrou at free.fr> added the comment:
Yes, fixing the conversion block is probably the right approach.
Apparently posixmodule.c uses PyUnicode_FSConverter, perhaps that would work?
(also make sure that the case where a bytes string is given is fixed too:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
FileNotFoundError: [Errno 2] No such file or directory: ''
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list