enhanced imapadapter, thanks Alan

This commit is contained in:
mdipierro
2012-09-18 13:39:16 -05:00
parent a72cdcfd90
commit d21af5b277
2 changed files with 14 additions and 7 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.0.9 (2012-09-18 13:37:38) stable Version 2.0.9 (2012-09-18 13:39:12) stable
+13 -6
View File
@@ -5504,13 +5504,15 @@ class IMAPAdapter(NoSQLAdapter):
# directly with set.update(deleted=True) # directly with set.update(deleted=True)
# This objects give access # This object give access
# to the adapter auto mailbox # to the adapter auto mailbox
# mapped names (which native # mapped names (which native
# mailbox has what table name) # mailbox has what table name)
db.mailboxes <list> # DAL instance mailbox tablenames db.mailboxes <dict> # tablename, server native name pairs
db.mailbox_names <dict> # tablename, server native name pairs
# To retrieve a table native mailbox name use:
db.<table>.mailbox
""" """
@@ -5813,10 +5815,15 @@ class IMAPAdapter(NoSQLAdapter):
Field("email", "string", writable=False, readable=False), Field("email", "string", writable=False, readable=False),
Field("attachments", "list:string", writable=False, readable=False), Field("attachments", "list:string", writable=False, readable=False),
) )
# Set a special _mailbox attribute for storing
# native mailbox names
self.db[mailbox_name].mailbox = \
self.connection.mailbox_names[mailbox_name]
# Set the db instance mailbox collections # Set the db instance mailbox collections
self.db.mailbox_names = self.connection.mailbox_names self.db.mailboxes = self.connection.mailbox_names
self.db.mailboxes = self.connection.mailbox_names.keys() return self.db.mailboxes
return self.db.mailbox_names
def create_table(self, *args, **kwargs): def create_table(self, *args, **kwargs):
# not implemented # not implemented