Message254756
| Author |
rokozh |
| Recipients |
rokozh |
| Date |
2015年11月16日.21:42:08 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1447710129.23.0.746208701925.issue25639@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
open('\\\\.\\PHYSICALDRIVE1','rb',0)
fails since python 3.5
At the end of _io_FileIO___init___impl function
_Py_fstat call raise OSError: [WinError 1] Incorrect function
_Py_fstat result not used on windows in this place.
440 self->blksize = DEFAULT_BUFFER_SIZE;
---> 441 if (_Py_fstat(self->fd, &fdfstat) < 0)
442 goto error;
443 #if defined(S_ISDIR) && defined(EISDIR)
444 /* On Unix, open will succeed for directories.
445 In Python, there should be no file objects referring to
446 directories, so we need a check. */
447 if (S_ISDIR(fdfstat.st_mode)) {
448 errno = EISDIR;
449 PyErr_SetFromErrnoWithFilenameObject(PyExc_IOError, nameobj);
450 goto error;
451 }
452 #endif /* defined(S_ISDIR) */
453 #ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
454 if (fdfstat.st_blksize > 1)
455 self->blksize = fdfstat.st_blksize;
456 #endif /* HAVE_STRUCT_STAT_ST_BLKSIZE */ |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2015年11月16日 21:42:09 | rokozh | set | recipients:
+ rokozh |
| 2015年11月16日 21:42:09 | rokozh | set | messageid: <1447710129.23.0.746208701925.issue25639@psf.upfronthosting.co.za> |
| 2015年11月16日 21:42:09 | rokozh | link | issue25639 messages |
| 2015年11月16日 21:42:08 | rokozh | create |
|