summaryrefslogtreecommitdiff
path: root/alot/db/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'alot/db/utils.py')
-rw-r--r--alot/db/utils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/alot/db/utils.py b/alot/db/utils.py
index c24ffef1..488e0ed7 100644
--- a/alot/db/utils.py
+++ b/alot/db/utils.py
@@ -15,7 +15,7 @@ import tempfile
import re
import logging
import mailcap
-from cStringIO import StringIO
+from io import BytesIO
from .. import crypto
from .. import helper
@@ -264,14 +264,14 @@ def message_from_file(handle):
def message_from_string(s):
'''Reads a mail from the given string. This is the equivalent of
:func:`email.message_from_string` which does nothing but to wrap
- the given string in a StringIO object and to call
+ the given string in a BytesIO object and to call
:func:`email.message_from_file`.
Please refer to the documentation of :func:`message_from_file` for
details.
'''
- return message_from_file(StringIO(s))
+ return message_from_file(BytesIO(s))
def extract_headers(mail, headers=None):