[PATCH] workaround - problem when selecting zimbra folders
marvinthepa
forke at uni-bonn.de
Tue Jan 4 10:29:33 GMT 2011
For certain folders on our zimbra instance, offlineimap somehow gets to
the state "SELECTED", while self.selectedfolder ist not yet
initialized.
I was not able to debug this thoroughly. However, this workaround helps.
If self.selectedfolder is not initialized, getselectedfolder returns None and
UsefulIMAPMixIn.select takes care of the rest.
Signed-off-by: marvinthepa <forke at uni-bonn.de>
---
offlineimap/imapserver.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/offlineimap/imapserver.py b/offlineimap/imapserver.py
index 74f1a27..a6c6c4e 100644
--- a/offlineimap/imapserver.py
+++ b/offlineimap/imapserver.py
@@ -39,7 +39,7 @@ class UsefulIMAPMixIn:
def getstate(self):
return self.state
def getselectedfolder(self):
- if self.getstate() == 'SELECTED':
+ if self.getstate() == 'SELECTED' and hasattr(self,"selectedfolder"):
return self.selectedfolder
return None
--
1.7.1
More information about the OfflineIMAP-project
mailing list