[PATCH 2/2] Update IMAP4_Tunnel.read() and IMAP4_Tunnel.send() for imaplib2

Sebastian Spaeth Sebastian at SSpaeth.de
Mon Apr 11 16:26:50 BST 2011


On Mon, 11 Apr 2011 06:14:30 -0400, Ethan Glasser-Camp wrote:
[...]
>      def send(self, data):
> -        self.outfd.write(data)
> +        if self.compressor is not None:
> +            data = self.compressor.compress(data)
> +            data += self.compressor.flush(zlib.Z_SYNC_FLUSH)
> +
> +        self.outfd.sendall(data)

Uhh, great catch on the compressor stuff. I would have missed that and
we would have more weird things to debug under *some* circumstances :-).

The whole patch seems to be correct, without it things would be pretty
broken, so it gets my

Reviewed-by: Sebastian Spaeth <Sebastian at SSpaeth.de> 

although I have not actually run it as I cannot test the tunnel auth
setup.

Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20110411/6c9aaa46/attachment-0001.sig>


More information about the OfflineIMAP-project mailing list