Message239577
| Author |
vstinner |
| Recipients |
holdenweb, piotr.dobrogost, python-dev, vstinner |
| Date |
2015年03月30日.08:19:58 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1427703598.96.0.319688241975.issue23752@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Hum, _Py_fstat() is not used correctly in _io.FilIO: it uses errno instead of GetLastError() to raise the OSError. It's too hard to use the new _Py_fstat() function directly, I modified it to raise directly the exception. So the caller doesn't have to use #ifdef MS_WINDOWS to raise the exception correctly.
I added _Py_fstat_noraise() when it's not possible to use an exception.
http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/5978/steps/test/logs/stdio
======================================================================
FAIL: test_fdopen (test.test_os.TestInvalidFD)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\buildbot.python.org3円.x.kloth-win64\build\lib\test\test_os.py", line 1418, in check
f(support.make_bad_fd(), *args)
File "C:\buildbot.python.org3円.x.kloth-win64\build\lib\os.py", line 1028, in fdopen
return io.open(fd, *args, **kwargs)
OSError: [Errno 0] Error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\buildbot.python.org3円.x.kloth-win64\build\lib\test\test_os.py", line 1411, in helper
self.check(getattr(os, f))
File "C:\buildbot.python.org3円.x.kloth-win64\build\lib\test\test_os.py", line 1420, in check
self.assertEqual(e.errno, errno.EBADF)
AssertionError: 0 != 9 |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2015年03月30日 08:19:58 | vstinner | set | recipients:
+ vstinner, holdenweb, python-dev, piotr.dobrogost |
| 2015年03月30日 08:19:58 | vstinner | set | messageid: <1427703598.96.0.319688241975.issue23752@psf.upfronthosting.co.za> |
| 2015年03月30日 08:19:58 | vstinner | link | issue23752 messages |
| 2015年03月30日 08:19:58 | vstinner | create |
|