From 0f96314e14f26c2a4aeebba90b4896edaff745e5 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Tue, 13 Aug 2013 17:32:09 +0200 Subject: catch uninitialized soledad attr --- src/leap/mail/imap/server.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/leap/mail') 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. -- cgit v1.2.3