diff options
author | Anton Khirnov <anton@khirnov.net> | 2021-02-01 15:29:53 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2021-02-01 15:29:53 +0100 |
commit | 5f7571eeaf30f054b71327100caab2a15431cf66 (patch) | |
tree | 670b736116a3b3cd50fc5d5603f9c001e056d0be | |
parent | 788f69048ba28f0345d9128eddf0522a34d6db08 (diff) |
Fix access to Attachment filename.
-rw-r--r-- | alot/commands/envelope.py | 2 | ||||
-rw-r--r-- | alot/widgets/thread.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/alot/commands/envelope.py b/alot/commands/envelope.py index f7337968..4b5a1fcc 100644 --- a/alot/commands/envelope.py +++ b/alot/commands/envelope.py @@ -81,7 +81,7 @@ class UnattachCommand(Command): if self.hint is not None: for a in envelope.attachments: - if self.hint in a.get_filename(): + if a.filename and self.hint in a.filename(): envelope.attachments.remove(a) else: envelope.attachments = [] diff --git a/alot/widgets/thread.py b/alot/widgets/thread.py index 52e23d07..7d3bafca 100644 --- a/alot/widgets/thread.py +++ b/alot/widgets/thread.py @@ -302,7 +302,7 @@ class _TextPart(_MIMEPartWidget): # decorate inline-forced attachments with a linebox if part.attachment: title = 'attachment %s' % part.content_type - fname = part.attachment.get_filename() + fname = part.attachment.filename if fname: title += ': %s' % fname |