[PATCH 3/8] [imaplib2 readd] Revert "[imaplib2 removal] Revert "Allow keepalive to be overridden by user if imapfolders is set""
Ethan Glasser-Camp
ethan at betacantrips.com
Tue Dec 28 11:46:20 GMT 2010
This reverts commit 3869af9e0b47db4c3ad4bddfc90b072d2a6b9e85.
---
offlineimap/repository/IMAP.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/offlineimap/repository/IMAP.py b/offlineimap/repository/IMAP.py
index bfee327..914b873 100644
--- a/offlineimap/repository/IMAP.py
+++ b/offlineimap/repository/IMAP.py
@@ -79,9 +79,11 @@ class IMAPRepository(BaseRepository):
return self.getconfboolean("holdconnectionopen", 0)
def getkeepalive(self):
- if self.getidlefolders():
+ num = self.getconfint("keepalive", 0)
+ if num == 0 and self.getidlefolders():
return 29*60
- return self.getconfint("keepalive", 0)
+ else:
+ return num
def getsep(self):
return self.imapserver.delim
--
1.7.1
More information about the OfflineIMAP-project
mailing list