]> granicus.if.org Git - python/commit
Issue #15478: Raising an OSError doesn't decode or encode the filename anymore
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 30 Oct 2012 01:17:38 +0000 (02:17 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Tue, 30 Oct 2012 01:17:38 +0000 (02:17 +0100)
commit292c835548df618983043b9698d0dc8c34adea12
tree11ae17b994b6eaaaf5625d05839ad16af03443f9
parent76df43de30f40b5cc1de9d36a5a083dd8bd8cb27
Issue #15478: Raising an OSError doesn't decode or encode the filename anymore

Pass the original filename argument to OSError constructor, instead of trying
to encode it to or decode it from the filesystem encoding. This change avoids
an additionnal UnicodeDecodeError on Windows if the filename cannot be decoded
from the filesystem encoding (ANSI code page).
Doc/library/exceptions.rst
Lib/test/support.py
Lib/test/test_os.py
Modules/_io/fileio.c
Modules/posixmodule.c