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