From 9398560306f5609bcf1d3fdda6511cdb3b67d3f3 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 24 Nov 2021 15:36:28 +0100 Subject: helper: move guess_mimetype into its own file --- alot/db/message.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'alot/db') diff --git a/alot/db/message.py b/alot/db/message.py index 01d7c7f1..f737721c 100644 --- a/alot/db/message.py +++ b/alot/db/message.py @@ -17,9 +17,9 @@ from urwid.util import detected_encoding from ..mail.attachment import Attachment from ..mail.policy import p as policy from .. import crypto -from .. import helper from ..errors import GPGProblem from ..settings.const import settings +from ..utils.magic import guess_mimetype from ..utils.mailcap import MailcapHandler charset.add_charset('utf-8', charset.QP, charset.QP, 'utf-8') @@ -262,7 +262,7 @@ class _MimeTree: # replace underspecified mime description by a better guess if ctype in ['octet/stream', 'application/octet-stream', 'application/octetstream']: - ctype = helper.guess_mimetype(self._part.get_content()) + ctype = guess_mimetype(self._part.get_content()) logging.debug('Overriding octet-stream content type to %s', ctype) maintype, _, subtype = ctype.partition('/') -- cgit v1.2.3