summaryrefslogtreecommitdiff
path: root/src/leap/mail/imap/messages.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/messages.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/messages.py')
-rw-r--r--src/leap/mail/imap/messages.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/leap/mail/imap/messages.py b/src/leap/mail/imap/messages.py
index 6f822db..25fc55f 100644
--- a/src/leap/mail/imap/messages.py
+++ b/src/leap/mail/imap/messages.py
@@ -328,7 +328,7 @@ class LeapMessage(fields, MailParser, MBoxParser):
# We are still returning funky characters from here.
else:
logger.warning("No BDOC found for message.")
- return write_fd(str(""))
+ return write_fd("")
@memoized_method
def _get_charset(self, stuff):
@@ -945,9 +945,7 @@ class MessageCollection(WithMsgFields, IndexedDB, MailParser, MBoxParser):
hd = stringify_parts_map(hd)
# The MessageContainer expects a dict, one-indexed
- # XXX review-me
- cdocs = dict(((key + 1, doc) for key, doc in
- enumerate(walk.get_raw_docs(msg, parts))))
+ cdocs = dict(enumerate(walk.get_raw_docs(msg, parts), 1))
self.set_recent_flag(uid)
msg_container = MessageWrapper(fd, hd, cdocs)