summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mail/src/leap/mail/walk.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/mail/src/leap/mail/walk.py b/mail/src/leap/mail/walk.py
index 18717529..dd3b7451 100644
--- a/mail/src/leap/mail/walk.py
+++ b/mail/src/leap/mail/walk.py
@@ -57,13 +57,12 @@ get_payloads = lambda msg: ((x.get_payload(),
get_body_phash_simple = lambda payloads: first(
[get_hash(payload) for payload, headers in payloads
- if payloads
- and "text/plain" in headers.get('content-type')])
+ if payloads])
get_body_phash_multi = lambda payloads: (first(
[get_hash(payload) for payload, headers in payloads
if payloads
- and "text/plain" in headers.get('content-type')])
+ and "text/plain" in headers.get('content-type', '')])
or get_body_phash_simple(payloads))
"""