[Python-checkins] r69873 - python/branches/io-c/Modules/_fileio.c
antoine.pitrou
python-checkins at python.org
Sun Feb 22 20:50:15 CET 2009
Author: antoine.pitrou
Date: Sun Feb 22 20:50:14 2009
New Revision: 69873
Log:
Only set the internal fd after it has been checked to be valid
(otherwise, the destructor will attempt to close it)
Modified:
python/branches/io-c/Modules/_fileio.c
Modified: python/branches/io-c/Modules/_fileio.c
==============================================================================
--- python/branches/io-c/Modules/_fileio.c (original)
+++ python/branches/io-c/Modules/_fileio.c Sun Feb 22 20:50:14 2009
@@ -315,10 +315,10 @@
#endif
if (fd >= 0) {
- self->fd = fd;
- self->closefd = closefd;
if (check_fd(fd))
goto error;
+ self->fd = fd;
+ self->closefd = closefd;
}
else {
self->closefd = 1;
More information about the Python-checkins
mailing list