Author calvin
Recipients calvin, loewis
Date 2007-10-25.20:58:44
SpamBayes Score 0.0089689
Marked as misclassified No
Message-id <>
Here is a new test script that works with simple strings and no file
objects. It reproduces the error by cutting off the last two bytes of
the GZIP data.

The resulting struct error is due to the read() methods missing a check
that the requested amount of data is actually returned. In this case
read(4) returned 2 bytes instead of 4, and the struct raises an error.

I think the easiest way to handle this is to introduce a
read_save(fileobj, size) method that checks that the read() data is of
the requested size, else raise an error (perhaps an IOError?).

btw: you can remove the t.{gz,py} files, the replaces
File name Uploaded calvin, 2007-10-25.20:58:44
Date User Action Args
2007-10-25 20:58:44calvinsetspambayes_score: 0.0089689 -> 0.0089689
recipients: + calvin, loewis
2007-10-25 20:58:44calvinsetspambayes_score: 0.0089689 -> 0.0089689
messageid: <>
2007-10-25 20:58:44calvinlinkissue1159051 messages
2007-10-25 20:58:44calvincreate