summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-08-13 17:32:09 +0200
committerKali Kaneko <kali@leap.se>2013-08-13 17:35:55 +0200
commit2e3dc39db27dfc024ff8953c2f1505a1d1914934 (patch)
tree855826dc33a9324abf2732ba7405f3e8b1e18fab /mail
parent3f33ca62d76986ab9471cf96e8e520f6ca4477df (diff)
catch uninitialized soledad attr
Diffstat (limited to 'mail')
-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.