This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients andreas.schawo, kristjan.jonsson, loewis, ocean-city, pitrou
Date 2009-03-23.21:05:41
SpamBayes Score 7.0949677e-09
Marked as misclassified No
Message-id <1237842343.93.0.620189303312.issue5544@psf.upfronthosting.co.za>
In-reply-to
Content
It is not strictly speaking "an error" which is causing the double
close... It's the deliberate behaviour of a test I have added to check
that errno is correctly set on the raised IOError when calling close()
on a FileIO object whose handle has already been closed manually (with
os.close()).

In other words, since it is possible to retrieve the file descriptor of
an IO object using the fileno() method (and, moreover, it is possible to
give an existing file descriptor to the open() function so as to wrap it
inside an IO object), access to a closed file is always possible and
should be protected against (that is, it raises an IOError with the
errno attribute equal to EBADF).
History
Date User Action Args
2009-03-23 21:05:44pitrousetrecipients: + pitrou, loewis, kristjan.jonsson, ocean-city, andreas.schawo
2009-03-23 21:05:43pitrousetmessageid: <1237842343.93.0.620189303312.issue5544@psf.upfronthosting.co.za>
2009-03-23 21:05:42pitroulinkissue5544 messages
2009-03-23 21:05:41pitroucreate