[PATCH] Always logout() on imaplib2 objects, even during exceptions
Ethan Glasser-Camp
ethan at betacantrips.com
Thu Mar 24 18:51:10 GMT 2011
Without this, trying to Ctrl-C out of offlineimap will go into a hang.
Signed-off-by: Ethan Glasser-Camp <ethan at betacantrips.com>
---
offlineimap/accounts.py | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/offlineimap/accounts.py b/offlineimap/accounts.py
index e806151..965052b 100644
--- a/offlineimap/accounts.py
+++ b/offlineimap/accounts.py
@@ -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)
--
1.7.1
More information about the OfflineIMAP-project
mailing list