summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2011-12-27 22:15:29 +0000
committerPatrick Totzke <patricktotzke@gmail.com>2011-12-27 22:15:29 +0000
commitc8334bb2672cca32cd2e6f503492b5a9205e7b14 (patch)
treee5d9f5457c4b97175f43309089c8c46ade3fcd41
parent10192d88573fd6a804469536826237ffad028b7d (diff)
isinstance(s, basestring) to match str and unicode
this fixes an issue with envelope.attach() failing due to its argument nor being an Attachment nor a str. This happens e.g. when you define a signature file, whose path gets handed to this method as unicode object.
-rw-r--r--alot/message.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/alot/message.py b/alot/message.py
index 2aa9381a..c01eb222 100644
--- a/alot/message.py
+++ b/alot/message.py
@@ -515,7 +515,7 @@ class Envelope(object):
if isinstance(attachment, Attachment):
self.attachments.append(attachment)
- elif isinstance(attachment, str):
+ elif isinstance(attachment, basestring):
path = os.path.expanduser(attachment)
part = helper.mimewrap(path, filename, ctype)
self.attachments.append(Attachment(part))