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:
parent
51b89e6c43
commit
105da1b0c3
@ -19,6 +19,8 @@ Changes
|
|||||||
Bug Fixes
|
Bug Fixes
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
* Fix hang when using Ctrl+C in some cases.
|
||||||
|
|
||||||
|
|
||||||
Pending for the next major release
|
Pending for the next major release
|
||||||
==================================
|
==================================
|
||||||
|
@ -265,10 +265,9 @@ class SyncableAccount(Account):
|
|||||||
mbnames.write()
|
mbnames.write()
|
||||||
localrepos.forgetfolders()
|
localrepos.forgetfolders()
|
||||||
remoterepos.forgetfolders()
|
remoterepos.forgetfolders()
|
||||||
|
finally:
|
||||||
localrepos.holdordropconnections()
|
localrepos.holdordropconnections()
|
||||||
remoterepos.holdordropconnections()
|
remoterepos.holdordropconnections()
|
||||||
finally:
|
|
||||||
pass
|
|
||||||
|
|
||||||
hook = self.getconf('postsynchook', '')
|
hook = self.getconf('postsynchook', '')
|
||||||
self.callhook(hook)
|
self.callhook(hook)
|
||||||
|
Loading…
Reference in New Issue
Block a user