Message133187
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. |
|
Date |
User |
Action |
Args |
2011-04-07 01:12:46 | r.david.murray | set | recipients:
+ r.david.murray, twouters, georg.brandl, amaury.forgeotdarc, sdaoden |
2011-04-07 01:12:46 | r.david.murray | set | messageid: <1302138766.28.0.0220049130326.issue11700@psf.upfronthosting.co.za> |
2011-04-07 01:12:44 | r.david.murray | link | issue11700 messages |
2011-04-07 01:12:44 | r.david.murray | create | |
|