summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mail/src/leap/mail/imap/messages.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/mail/src/leap/mail/imap/messages.py b/mail/src/leap/mail/imap/messages.py
index 6ff3967..4a07ef7 100644
--- a/mail/src/leap/mail/imap/messages.py
+++ b/mail/src/leap/mail/imap/messages.py
@@ -299,7 +299,9 @@ class LeapMessage(fields, MailParser, MBoxParser):
return fd
# TODO refactor with getBodyFile in MessagePart
+
fd = StringIO.StringIO()
+
if self._bdoc is not None:
bdoc_content = self._bdoc.content
if empty(bdoc_content):
@@ -456,8 +458,8 @@ class LeapMessage(fields, MailParser, MBoxParser):
:rtype: Any object implementing C{IMessagePart}.
:return: The specified sub-part.
"""
- #if not self.isMultipart():
- #raise TypeError
+ if not self.isMultipart():
+ raise TypeError
try:
pmap_dict = self._get_part_from_parts_map(part + 1)
except KeyError: