diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2011-12-27 22:15:29 +0000 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2011-12-27 22:15:29 +0000 |
commit | c8334bb2672cca32cd2e6f503492b5a9205e7b14 (patch) | |
tree | e5d9f5457c4b97175f43309089c8c46ade3fcd41 | |
parent | 10192d88573fd6a804469536826237ffad028b7d (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.py | 2 |
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)) |