summaryrefslogtreecommitdiff
path: root/src/leap/mail/adaptors/models.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2015-08-03 14:27:48 -0400
committerKali Kaneko <kali@leap.se>2015-08-03 14:27:48 -0400
commita778140a3dfa2907d2e1d45cfa87ee3b2dd5329a (patch)
treedb4b3587b6295730e059279925cbb97fbdb7cb7b /src/leap/mail/adaptors/models.py
parentf27ad9a3fdb2a6746ddb13fe4c117614c4b59364 (diff)
parent5027dd2dd3c7679a7eea025d838a7d472c355623 (diff)
Merge remote-tracking branch 'leapcode/pr/188' into develop
Diffstat (limited to 'src/leap/mail/adaptors/models.py')
-rw-r--r--src/leap/mail/adaptors/models.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/leap/mail/adaptors/models.py b/src/leap/mail/adaptors/models.py
index 88e0e4e..2bf9e60 100644
--- a/src/leap/mail/adaptors/models.py
+++ b/src/leap/mail/adaptors/models.py
@@ -115,10 +115,8 @@ class DocumentWrapper(object):
def _normalize_dict(_dict):
items = _dict.items()
- not_callable = lambda (k, v): not callable(v)
- not_private = lambda(k, v): not k.startswith('_')
- for cond in not_callable, not_private:
- items = filter(cond, items)
+ items = filter(lambda (k, v): not callable(v), items)
+ items = filter(lambda (k, v): not k.startswith('_'), items)
items = [(k, v) if not k.endswith('_') else (k[:-1], v)
for (k, v) in items]
items = [(k.replace('-', '_'), v) for (k, v) in items]