[issue15478] UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename
STINNER Victor
report at bugs.python.org
Fri Aug 3 14:19:59 CEST 2012
STINNER Victor added the comment:
Attached patch modifies all functions of the os module taking filenames to keep the filename unmodified in OSError.filename.
The patch changes also os.link(), os.rename() and os.replace() to use the source, not the destination, in the error message. It is maybe a mistake because these functions can also fail in the directory of the destination does not exist.
----------
keywords: +patch
Added file: http://bugs.python.org/file26675/oserror_filename.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15478>
_______________________________________
More information about the Python-bugs-list
mailing list