diff options
author | Anton Khirnov <anton@khirnov.net> | 2021-02-01 08:06:36 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2021-02-01 08:06:36 +0100 |
commit | 788f69048ba28f0345d9128eddf0522a34d6db08 (patch) | |
tree | 7377223fac1a728af95d394a94040ad4e02af116 | |
parent | 999de45bad934654a7b1f1d874d08fbe0922660f (diff) |
mail/attachment: add methods forgotten in 309fb25e
-rw-r--r-- | alot/mail/attachment.py | 7 |
1 files changed, 7 insertions, 0 deletions
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] |