diff options
author | Kali Kaneko <kali@leap.se> | 2015-08-03 14:27:48 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2015-08-03 14:27:48 -0400 |
commit | a778140a3dfa2907d2e1d45cfa87ee3b2dd5329a (patch) | |
tree | db4b3587b6295730e059279925cbb97fbdb7cb7b /src/leap/mail/imap/messages.py | |
parent | f27ad9a3fdb2a6746ddb13fe4c117614c4b59364 (diff) | |
parent | 5027dd2dd3c7679a7eea025d838a7d472c355623 (diff) |
Merge remote-tracking branch 'leapcode/pr/188' into develop
Diffstat (limited to 'src/leap/mail/imap/messages.py')
-rw-r--r-- | src/leap/mail/imap/messages.py | 7 |
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) |