summaryrefslogtreecommitdiff
path: root/src/leap/mail/imap/messages.py
diff options
context:
space:
mode:
authorBruno Wagner <bwgpro@gmail.com>2015-07-21 20:11:29 -0300
committerBruno Wagner <bwgpro@gmail.com>2015-07-21 20:11:29 -0300
commit3f171207e73790b512cbfa187f8c01e0b5f076a9 (patch)
treef4103ec8637913f156ec562a19967cab1bed97bc /src/leap/mail/imap/messages.py
parent11d4373226c8ab32c31fa92beed8aedb962dd756 (diff)
Changed imap tests and messages assigned lambdas to functions because of pep8
Diffstat (limited to 'src/leap/mail/imap/messages.py')
-rw-r--r--src/leap/mail/imap/messages.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/leap/mail/imap/messages.py b/src/leap/mail/imap/messages.py
index 9af4c99..d1c7b93 100644
--- a/src/leap/mail/imap/messages.py
+++ b/src/leap/mail/imap/messages.py
@@ -217,10 +217,13 @@ def _format_headers(headers, negate, *names):
return {str('content-type'): str('')}
names = map(lambda s: s.upper(), names)
+
if negate:
- cond = lambda key: key.upper() not in names
+ def cond(key):
+ return key.upper() not in names
else:
- cond = lambda key: key.upper() in names
+ def cond(key):
+ return key.upper() in names
if isinstance(headers, list):
headers = dict(headers)