projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6ae5d7f
)
Fixed bug in _fileio.c and test_pep277. On Windows IOError.filename was not set becau...
author
Christian Heimes
<christian@cheimes.de>
Wed, 31 Oct 2007 19:20:48 +0000
(19:20 +0000)
committer
Christian Heimes
<christian@cheimes.de>
Wed, 31 Oct 2007 19:20:48 +0000
(19:20 +0000)
Modules/_fileio.c
patch
|
blob
|
history
diff --git
a/Modules/_fileio.c
b/Modules/_fileio.c
index 8469bb248f27ac1fc4b6e4df94c69c915e78f4b8..f02c5ef16a2f9308c488eed0f3887b9e3327b51a 100644
(file)
--- a/
Modules/_fileio.c
+++ b/
Modules/_fileio.c
@@
-267,7
+267,11
@@
fileio_init(PyObject *oself, PyObject *args, PyObject *kwds)
self->fd = open(name, flags, 0666);
Py_END_ALLOW_THREADS
if (self->fd < 0 || dircheck(self) < 0) {
+#ifdef MS_WINDOWS
+ PyErr_SetFromErrnoWithUnicodeFilename(PyExc_IOError, widename);
+#else
PyErr_SetFromErrnoWithFilename(PyExc_IOError, name);
+#endif
goto error;
}
}