From 788f69048ba28f0345d9128eddf0522a34d6db08 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 1 Feb 2021 08:06:36 +0100 Subject: mail/attachment: add methods forgotten in 309fb25e --- alot/mail/attachment.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/alot/mail/attachment.py b/alot/mail/attachment.py index 5c993a68..114859fc 100644 --- a/alot/mail/attachment.py +++ b/alot/mail/attachment.py @@ -54,3 +54,10 @@ class Attachment: ret += ' (%s)' % _humanize_size(len(self.data)) return ret + + @property + def content_maintype(self): + return self.content_type.partition('/')[0] + @property + def content_subtype(self): + return self.content_type.partition('/')[2] -- cgit v1.2.3