diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2016-10-19 14:24:00 +0100 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2016-10-19 14:24:00 +0100 |
commit | 012cfc90f00109b56cea239aa8d02ff9cd8f1583 (patch) | |
tree | dc418a499db487187684c1cde18cdd9101164494 | |
parent | 747b894bbe2156bae2c1f128ec0b4344d7c28378 (diff) |
fix #891
-rw-r--r-- | alot/db/utils.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/alot/db/utils.py b/alot/db/utils.py index 63bd6b89..286e652e 100644 --- a/alot/db/utils.py +++ b/alot/db/utils.py @@ -107,11 +107,11 @@ def message_from_file(handle): if len(m.get_payload()) != 2: malformed = u'expected exactly two messages, got {0}'.format( len(m.get_payload())) - - ct = m.get_payload(1).get_content_type() - if ct != app_pgp_sig: - malformed = u'expected Content-Type: {0}, got: {1}'.format( - app_pgp_sig, ct) + else: + ct = m.get_payload(1).get_content_type() + if ct != app_pgp_sig: + malformed = u'expected Content-Type: {0}, got: {1}'.format( + app_pgp_sig, ct) # TODO: RFC 3156 says the alg has to be lower case, but I've # seen a message with 'PGP-'. maybe we should be more |