diff options
author | Lucas Hoffmann <lucc@posteo.de> | 2018-10-11 01:22:42 +0200 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2018-12-03 08:28:32 +0000 |
commit | 1d95cf991130df7f4d277ed2f840a397d512146d (patch) | |
tree | fca1b5efc4ff53340777d4a3a7d699f3a283ed87 /alot/db | |
parent | d5b3aab3ac12e0f627b03aedbbe14c8df0d709b2 (diff) |
Add test for #1301
This adds a test for detecting a malformed content-transfer-encoding
(trailing semi-colon).
It also changes the raised exception to the more appropriate ValueError.
Diffstat (limited to 'alot/db')
-rw-r--r-- | alot/db/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/alot/db/utils.py b/alot/db/utils.py index 0a7a3e7a..1284098c 100644 --- a/alot/db/utils.py +++ b/alot/db/utils.py @@ -416,7 +416,7 @@ def remove_cte(part, as_string=False): elif cte == 'base64': raw_payload = base64.b64decode(payload) else: - raise Exception( + raise ValueError( 'Unknown Content-Transfer-Encoding: "{}"'.format(cte)) # message.get_payload(decode=True) also handles a number of unicode # encodindigs. maybe those are useful? |