Always logout() on imaplib2 objects, even during exceptions
Without this, trying to Ctrl-C out of offlineimap will go into a hang. Signed-off-by: Ethan Glasser-Camp <ethan@betacantrips.com> Reviewed-by: Sebastian Spaeth <Sebastian@SSpaeth.de> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:

committed by
Nicolas Sebrecht

parent
51b89e6c43
commit
105da1b0c3
@ -265,10 +265,9 @@ class SyncableAccount(Account):
|
||||
mbnames.write()
|
||||
localrepos.forgetfolders()
|
||||
remoterepos.forgetfolders()
|
||||
finally:
|
||||
localrepos.holdordropconnections()
|
||||
remoterepos.holdordropconnections()
|
||||
finally:
|
||||
pass
|
||||
|
||||
hook = self.getconf('postsynchook', '')
|
||||
self.callhook(hook)
|
||||
|
Reference in New Issue
Block a user