summaryrefslogtreecommitdiff
path: root/mail/src/leap
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2016-02-11 01:18:11 +0100
committerRuben Pollan <meskio@sindominio.net>2016-02-11 01:18:11 +0100
commit3f9bfdb7a846fa165e222543f02dc8e72fcc891b (patch)
tree832a824a7ae2bcb18ed836bab512e746a607a7af /mail/src/leap
parent2ae9c3c225db5b1269022eeb577af30fa6c7cf40 (diff)
[feat] Remove debug from walk
Diffstat (limited to 'mail/src/leap')
-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 1c74366a..7be1bb87 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 [