[PATCHv2 2/2] Re: Adapt the code to work with the new imaplib2
Nicolas Sebrecht
nicolas.s-dev at laposte.net
Mon Aug 15 11:40:47 BST 2011
On Mon, Aug 15, 2011 at 11:55:42AM +0200, Sebastian Spaeth wrote:
> imaplib renamed self.sslobj to self.sock and our overriden open()
> functions were failing for that reason when updating imaplib2 to
> v2.28. It turns out that all of our custom initializations are being
> done by stock imaplib2 now anyway, so there is no need to override them
> anymore. This lets us simplify the code we have to worry about.
>
> Move the verifycert() function to the imapserver.py file, it is now a
> callback function that is being handed to imaplib from there, so it
> makes sense to also define it in our imapserver function...
> (this also lets us easily make use of the verifycert function in the
> starttls case in the future)
>
> TODO: we need to examine if and why we still need to override the
> select() function, it is the only reason why we still wrap the IMAP4
> classes.
Looks like with this topic I get
Establishing connection to imap.gmx.com:993.
ERROR [<InstanceLimitedThread(Account sync dev.gmx, started daemon 140094175270656)>]: While attempting to sync account dev.gmx:
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/offlineimap/accounts.py", line 178, in syncrunner
self.sync()
File "/usr/lib64/python2.7/site-packages/offlineimap/accounts.py", line 236, in sync
remoterepos.syncfoldersto(localrepos, [statusrepos])
File "/usr/lib64/python2.7/site-packages/offlineimap/repository/Base.py", line 124, in syncfoldersto
srcfolders = src.getfolders()
File "/usr/lib64/python2.7/site-packages/offlineimap/repository/IMAP.py", line 277, in getfolders
imapobj = self.imapserver.acquireconnection()
File "/usr/lib64/python2.7/site-packages/offlineimap/imapserver.py", line 321, in acquireconnection
elif isinstance(e, socket.error) and e.args[0] == errno.ECONNREFUSED:
NameError: global name 'errno' is not defined
global name 'errno' is not defined
--
Nicolas Sebrecht
More information about the OfflineIMAP-project
mailing list