summaryrefslogtreecommitdiff
path: root/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
commit51e6f7a5eb8cb3e5bd69e4c55c5360b37a6f2111 (patch)
tree203f3761dda136fdd8b30cc6b660e44b5e600069 /src/leap
parentaa87f3bb4205b6a756668aac15fe92acb41bf067 (diff)
[feat] Remove debug from walk
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/mail/walk.py17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/leap/mail/walk.py b/src/leap/mail/walk.py
index 1c74366..7be1bb8 100644
--- a/src/leap/mail/walk.py
+++ b/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 [