summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2014-01-09 20:12:34 -0300
committerTomás Touceda <chiiph@leap.se>2014-01-09 20:12:34 -0300
commitf4ab2153796f4ba227cc3b7cc98fd3fe83901806 (patch)
tree77283863e03e5f535300cf1fc356d1d85ae7adb4 /src/leap
parenta23ac93ac15c3df26065c1bbcb35051b84d924ff (diff)
parentbffdcddee55d1045be5d5c8378f712283863b6bf (diff)
Merge remote-tracking branch 'refs/remotes/kali/bug/walk_check_for_none' into develop
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/mail/walk.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/leap/mail/walk.py b/src/leap/mail/walk.py
index 820b8c7..dc13345 100644
--- a/src/leap/mail/walk.py
+++ b/src/leap/mail/walk.py
@@ -57,11 +57,13 @@ get_payloads = lambda msg: ((x.get_payload(),
get_body_phash_simple = lambda payloads: first(
[get_hash(payload) for payload, headers in payloads
- if "text/plain" in headers.get('content-type')])
+ if payloads
+ and "text/plain" in headers.get('content-type')])
get_body_phash_multi = lambda payloads: (first(
[get_hash(payload) for payload, headers in payloads
- if "text/plain" in headers.get('content-type')])
+ if payloads
+ and "text/plain" in headers.get('content-type')])
or get_body_phash_simple(payloads))
"""