summaryrefslogtreecommitdiff
path: root/src/leap
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
commit0f96314e14f26c2a4aeebba90b4896edaff745e5 (patch)
treed5f2a03105dde6550063d793bc93cf2bb63d7ede /src/leap
parent9dfbfca17220f85bbbad768ae564bc0ca6c9b3d3 (diff)
catch uninitialized soledad attr
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/mail/imap/server.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/leap/mail/imap/server.py b/src/leap/mail/imap/server.py
index 813d850..51df86e 100644
--- a/src/leap/mail/imap/server.py
+++ b/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.