diff options
author | Anton Khirnov <anton@khirnov.net> | 2020-02-27 18:29:51 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2020-02-27 18:32:13 +0100 |
commit | c6e3144579bd8310b04d326f4ee32035fe237925 (patch) | |
tree | e75787798ebb994a7374f60c55f355693fcae0b0 /alot/db | |
parent | bb140bf38725d15a6088a690e1539b26661fc4c9 (diff) |
db/attachment: drop useless call to decode_header()
It is already decoded.
Diffstat (limited to 'alot/db')
-rw-r--r-- | alot/db/attachment.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/alot/db/attachment.py b/alot/db/attachment.py index d8651116..4dc15994 100644 --- a/alot/db/attachment.py +++ b/alot/db/attachment.py @@ -8,7 +8,6 @@ import email.charset as charset from copy import deepcopy from ..helper import string_decode, humanize_size, guess_mimetype -from .utils import decode_header charset.add_charset('utf-8', charset.QP, charset.QP, 'utf-8') @@ -37,9 +36,7 @@ class Attachment: """ fname = self.part.get_filename() if fname: - extracted_name = decode_header(fname) - if extracted_name: - return os.path.basename(extracted_name) + return os.path.basename(fname) return None def get_content_type(self): |