Leon Matthews <l...@lost.co.nz> added the comment:

I've attached a patch to SpooledTemporaryFile (and its test class) to
remove the suprising exceptions.

SpooledTemporaryFile uses a io.StringIO for storage (in self._file)
until it reaches a certain size (or rollover() is called), at which
point it switches to a file object (or _TemporaryFileWrapper on
non-posix platforms).  This implementation detail should be abstracted
away from the user.

The interface mismatch there which caused an AttributeError to be thrown
-- but only if the file size was new, or below a certain size.

----------
keywords: +patch
Added file: http://bugs.python.org/file14542/SpooledTemporaryFile.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6541>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to