summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mail/src/leap/mail/imap/server.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mail/src/leap/mail/imap/server.py b/mail/src/leap/mail/imap/server.py
index 813d8503..51df86eb 100644
--- a/mail/src/leap/mail/imap/server.py
+++ b/mail/src/leap/mail/imap/server.py
@@ -121,6 +121,9 @@ class IndexedDB(object):
leap_assert_type(self.INDEXES, dict)
# Ask the database for currently existing indexes.
+ if not self._soledad:
+ logger.debug("NO SOLEDAD ON IMAP INITIALIZATION")
+ return
db_indexes = dict(self._soledad.list_indexes())
for name, expression in SoledadBackedAccount.INDEXES.items():
if name not in db_indexes:
@@ -788,6 +791,7 @@ class LeapMessage(WithMsgFields):
"""
return self._doc.content.get(key, None)
+
class MessageCollection(WithMsgFields, IndexedDB):
"""
A collection of messages, surprisingly.