Author: christian.heimes
Date: Wed Oct 31 20:20:48 2007
New Revision: 58733

Modified:
   python/branches/py3k/Modules/_fileio.c
Log:
Fixed bug in _fileio.c and test_pep277. On Windows IOError.filename was not set 
because the name is stored in widename.

Modified: python/branches/py3k/Modules/_fileio.c
==============================================================================
--- python/branches/py3k/Modules/_fileio.c      (original)
+++ python/branches/py3k/Modules/_fileio.c      Wed Oct 31 20:20:48 2007
@@ -267,7 +267,11 @@
                        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;
                }
        }
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to