summaryrefslogtreecommitdiff
path: root/src/leap/mail
diff options
context:
space:
mode:
authorFolker Bernitt <fbernitt@thoughtworks.com>2015-07-29 16:11:33 +0200
committerFolker Bernitt <fbernitt@thoughtworks.com>2015-07-29 16:11:33 +0200
commit5027dd2dd3c7679a7eea025d838a7d472c355623 (patch)
tree0a01e8dfc7cd33dd51c5c3a9ef54e4a5b45e8dc3 /src/leap/mail
parent3f171207e73790b512cbfa187f8c01e0b5f076a9 (diff)
[bug] fixed syntax error in models.py
The lambdas take two args, so it needs to be a tuple. Furthermore filter needs a collection.
Diffstat (limited to 'src/leap/mail')
-rw-r--r--src/leap/mail/adaptors/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/leap/mail/adaptors/models.py b/src/leap/mail/adaptors/models.py
index c5b838a..2bf9e60 100644
--- a/src/leap/mail/adaptors/models.py
+++ b/src/leap/mail/adaptors/models.py
@@ -115,8 +115,8 @@ class DocumentWrapper(object):
def _normalize_dict(_dict):
items = _dict.items()
- items = filter(lambda k, v: not callable(v), items)
- items = filter(lambda k, v: not k.startswith('_'))
+ 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]