summaryrefslogtreecommitdiff
path: root/src/leap/bitmask
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/bitmask')
-rw-r--r--src/leap/bitmask/mail/imap/mailbox.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/leap/bitmask/mail/imap/mailbox.py b/src/leap/bitmask/mail/imap/mailbox.py
index 5e4fa6a5..836b38fd 100644
--- a/src/leap/bitmask/mail/imap/mailbox.py
+++ b/src/leap/bitmask/mail/imap/mailbox.py
@@ -19,6 +19,7 @@ IMAP Mailbox.
"""
import re
import os
+import io
import cStringIO
import StringIO
import time
@@ -390,7 +391,8 @@ class IMAPMailbox(object):
# A better solution will probably involve implementing MULTIAPPEND
# extension or patching imap server to support pipelining.
- if isinstance(message, (cStringIO.OutputType, StringIO.StringIO)):
+ if isinstance(message,
+ (cStringIO.OutputType, StringIO.StringIO, io.BytesIO)):
message = message.getvalue()
leap_assert_type(message, basestring)