unexpected keyword argument 'timeout'
Sebastian Spaeth
Sebastian at SSpaeth.de
Sun Apr 10 22:17:30 BST 2011
On Sun, 10 Apr 2011 20:55:08 +0200, Daniel Kreischer <d.t.kreischer at gmx.de> wrote:
> maybe it's just me, but git master fails badly for me :/
No, it's broken code. I am afraid the "Tunnel" option is not a well
excercised code paths.
> "/media/dump/offlineimap/git/offlineimap/offlineimap/imapserver.py", line 200, in acquireconnection
> timeout=socket.getdefaulttimeout())
> TypeError: __init__() got an unexpected keyword argument 'timeout'
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???
So, the timeout argument certainly needs to go.
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?
We did do that for the other implementations IMHO.
This needs to be fixed before next release, I think or the Tunnel option
is borked.
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/20110410/5d1ad684/attachment-0001.sig>
More information about the OfflineIMAP-project
mailing list