unexpected keyword argument 'timeout'
Ethan Glasser-Camp
glasse at cs.rpi.edu
Mon Apr 11 07:20:45 BST 2011
On 04/10/2011 05:17 PM, Sebastian Spaeth wrote:
> That is right (or rather wrong). imapserver.py calls IMAP4_Tunnel with
> the timeout argument, but the class IMAP4_Tunnel(UsefulIMAPMixIn, IMAP4)
> doesn't have that. And the __init__ of IMAP4_Tunnel has not been changed
> since 2007???
It should just pass the timeout parameter to the IMAP4.__init__ method.
I guess we could also not pass the timeout argument in that case, but it
would be better if it got up to the parent class.
> Looking at that tunnel class:
>
> @Ethan, the custom read implementation loops to make sure that it reads
> EXACTLY n bytes, rather than UP TO n bytes. Should that read()
> implementation probably be changed too in case we get empty replies?
Yeah, but I'm not really sure exactly what it should do. I think it
should be like IMAP4.read but with s/self.sock.recv/self.infd.read/.
Ethan
More information about the OfflineIMAP-project
mailing list