summaryrefslogtreecommitdiff
path: root/mail/src
diff options
context:
space:
mode:
Diffstat (limited to 'mail/src')
-rw-r--r--mail/src/leap/mail/walk.py17
1 files changed, 3 insertions, 14 deletions
diff --git a/mail/src/leap/mail/walk.py b/mail/src/leap/mail/walk.py
index 1c74366..7be1bb8 100644
--- a/mail/src/leap/mail/walk.py
+++ b/mail/src/leap/mail/walk.py
@@ -17,20 +17,13 @@
"""
Utilities for walking along a message tree.
"""
-import os
-
from pycryptopp.hash import sha256
from leap.mail.utils import first
-DEBUG = os.environ.get("BITMASK_MAIL_DEBUG")
-if DEBUG:
- def get_hash(s):
- return sha256.SHA256(s).hexdigest()[:10]
-else:
- def get_hash(s):
- return sha256.SHA256(s).hexdigest()
+def get_hash(s):
+ return sha256.SHA256(s).hexdigest()
"""
@@ -92,7 +85,7 @@ def get_raw_docs(msg, parts):
return (
{
"type": "cnt", # type content they'll be
- "raw": payload if not DEBUG else payload[:100],
+ "raw": payload,
"phash": get_hash(payload),
"content-disposition": first(headers.get(
'content-disposition', '').split(';')),
@@ -168,10 +161,6 @@ def walk_msg_tree(parts, body_phash=None):
inner_headers = parts[1].get(HEADERS, None) if (
len(parts) == 2) else None
- if DEBUG:
- print "parts vector: ", pv
- print
-
# wrappers vector
def getwv(pv):
return [