summaryrefslogtreecommitdiff
path: root/src/leap/mail/imap/soledadstore.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2014-02-04 10:57:49 -0400
committerKali Kaneko <kali@leap.se>2014-02-04 14:45:47 -0400
commit23e28bae2c3cb74e00e29ee8add0b73adeb65c2b (patch)
treeeec0561e2184472dfedba3135a3d005efd478c34 /src/leap/mail/imap/soledadstore.py
parent8201146254a204fec92395bf497a2a6f76274b85 (diff)
fixes after review
* Some more docstring completion/fixes. * Removed unneeded str coertion. * Handle mailbox name in logs. * Separate manhole boilerplate into its own file.
Diffstat (limited to 'src/leap/mail/imap/soledadstore.py')
-rw-r--r--src/leap/mail/imap/soledadstore.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/leap/mail/imap/soledadstore.py b/src/leap/mail/imap/soledadstore.py
index 82f27e7..8e22f26 100644
--- a/src/leap/mail/imap/soledadstore.py
+++ b/src/leap/mail/imap/soledadstore.py
@@ -253,9 +253,11 @@ class SoledadStore(ContentDedup):
"""
Consume each document wrapper in a separate thread.
- :param doc_wrapper:
- :type doc_wrapper:
- :param deferred:
+ :param doc_wrapper: a MessageWrapper or RecentFlagsDoc instance
+ :type doc_wrapper: MessageWrapper or RecentFlagsDoc
+ :param deferred: a deferred that will be fired when the write operation
+ has finished, either calling its callback or its
+ errback depending on whether it succeed.
:type deferred: Deferred
"""
items = self._process(doc_wrapper)
@@ -415,6 +417,7 @@ class SoledadStore(ContentDedup):
:param uid: the UID for the message
:type uid: int
"""
+ result = None
try:
flag_docs = self._soledad.get_from_index(
fields.TYPE_MBOX_UID_IDX,
@@ -447,7 +450,7 @@ class SoledadStore(ContentDedup):
mbox_doc = self._get_mbox_document(mbox)
old_val = mbox_doc.content[key]
if value < old_val:
- logger.error("%s:%s Tried to write a UID lesser than what's "
+ logger.error("%r:%s Tried to write a UID lesser than what's "
"stored!" % (mbox, value))
mbox_doc.content[key] = value
self._soledad.put_doc(mbox_doc)