diff options
author | Anton Khirnov <anton@khirnov.net> | 2021-11-24 15:36:28 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2021-11-24 15:36:28 +0100 |
commit | 9398560306f5609bcf1d3fdda6511cdb3b67d3f3 (patch) | |
tree | 3bec6342ab9cdea709f49d87f4de0cf82b90f343 /alot/db | |
parent | 652f88fa9c6db6c8185bedaf527364c719e5fe72 (diff) |
helper: move guess_mimetype into its own file
Diffstat (limited to 'alot/db')
-rw-r--r-- | alot/db/message.py | 4 |
1 files changed, 2 insertions, 2 deletions
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('/') |