From c6e3144579bd8310b04d326f4ee32035fe237925 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 27 Feb 2020 18:29:51 +0100 Subject: db/attachment: drop useless call to decode_header() It is already decoded. --- alot/db/attachment.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'alot/db') 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): -- cgit v1.2.3