summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--alot/commands/thread.py4
-rw-r--r--alot/db/utils.py6
-rw-r--r--alot/helper.py2
3 files changed, 6 insertions, 6 deletions
diff --git a/alot/commands/thread.py b/alot/commands/thread.py
index 609a4f3a..5e014142 100644
--- a/alot/commands/thread.py
+++ b/alot/commands/thread.py
@@ -14,7 +14,7 @@ from email.utils import getaddresses, parseaddr, formataddr
from email.message import Message
from twisted.internet.defer import inlineCallbacks
-from io import BytesIO
+from io import StringIO
from . import Command, registerCommand
from .globals import ExternalCommand
@@ -993,7 +993,7 @@ class OpenAttachmentCommand(Command):
def afterwards():
os.unlink(tempfile_name)
else:
- handler_stdin = BytesIO()
+ handler_stdin = StringIO()
self.attachment.write(handler_stdin)
# create handler command list
diff --git a/alot/db/utils.py b/alot/db/utils.py
index 14e6ebc9..f57d62bd 100644
--- a/alot/db/utils.py
+++ b/alot/db/utils.py
@@ -15,7 +15,7 @@ import tempfile
import re
import logging
import mailcap
-from io import BytesIO
+from io import StringIO
from .. import crypto
from .. import helper
@@ -265,14 +265,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 BytesIO object and to call
+ the given string in a StringIO 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(BytesIO(s))
+ return message_from_file(StringIO(s))
def extract_headers(mail, headers=None):
diff --git a/alot/helper.py b/alot/helper.py
index 5fab4819..400d8c0e 100644
--- a/alot/helper.py
+++ b/alot/helper.py
@@ -10,7 +10,7 @@ from datetime import timedelta
from datetime import datetime
from collections import deque
from io import BytesIO
-from cStringIO import StringIO
+from io import StringIO
import logging
import mimetypes
import os