Message133187
| Author |
r.david.murray |
| Recipients |
amaury.forgeotdarc, georg.brandl, r.david.murray, sdaoden, twouters |
| Date |
2011年04月07日.01:12:44 |
| SpamBayes Score |
8.343315e-05 |
| Marked as misclassified |
No |
| Message-id |
<1302138766.28.0.0220049130326.issue11700@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Given your problem report wouldn't the simplest solution be to change the close method to be:
if hasattr(self, '_file'):
if hasattr(self._file, 'close'):
self._file.close()
del self._file
As for a test, it seems to me that adding a test to the appropriate existing cases that calls get_file and then closes the returned object twice should be sufficient. |
|