Message194940
It happens because if the length of data is more than 1000:
def __write(self, line):
"""line is always bytes, not string"""
if self.__file is not None:
if self.__file.tell() + len(line) > 1000:
self.file = self.make_file()
data = self.__file.getvalue()
self.file.write(data)
self.__file = None
......
it will create a temporary file.
Attached the patch to close the temporary file in the destructor method.
About the 1000 number, should we put it in constant? Why 1000? This number is so random. For now, I just leave it as it is. |
|
Date |
User |
Action |
Args |
2013-08-12 11:22:20 | vajrasky | set | recipients:
+ vajrasky, barry, orsenthil, flox, serhiy.storchaka |
2013-08-12 11:22:20 | vajrasky | set | messageid: <1376306540.5.0.50590461443.issue18394@psf.upfronthosting.co.za> |
2013-08-12 11:22:20 | vajrasky | link | issue18394 messages |
2013-08-12 11:22:20 | vajrasky | create | |
|