summaryrefslogtreecommitdiff
path: root/alot/commands/thread.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2017-08-16 11:50:25 -0700
committerDylan Baker <dylan@pnwbakers.com>2017-08-19 12:52:26 -0700
commitfa3dd1b04567c4ea03fa658c3838b569531c79f5 (patch)
tree6ffc0eedbf03b11ed87f92bd609bca6533ed64aa /alot/commands/thread.py
parentdee41bb04906d6976b4f7c05c222f7d95182b3ea (diff)
Use io.BytesIO and io.StringIO
In python3 StringIO and cStringIO are gone. In their place are io.BytesIO and io.StringIO. They are somewhat different in that they are not separated on implementation, but on the type they emulated. BytesIO works like the bytes class (str in python 2), while StringIO works like the str class (unicode in python2).
Diffstat (limited to 'alot/commands/thread.py')
-rw-r--r--alot/commands/thread.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/alot/commands/thread.py b/alot/commands/thread.py
index d73ef622..02017ae9 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 cStringIO import StringIO
+from io import BytesIO
from . import Command, registerCommand
from .globals import ExternalCommand
@@ -970,7 +970,7 @@ class OpenAttachmentCommand(Command):
def afterwards():
os.unlink(tempfile_name)
else:
- handler_stdin = StringIO()
+ handler_stdin = BytesIO()
self.attachment.write(handler_stdin)
# create handler command list