Message194940
| Author |
vajrasky |
| Recipients |
barry, flox, orsenthil, serhiy.storchaka, vajrasky |
| Date |
2013年08月12日.11:22:20 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1376306540.5.0.50590461443.issue18394@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|