From 229ab30fc0226b277b040e6398936856e3f66dcf Mon Sep 17 00:00:00 2001 From: Folker Bernitt Date: Wed, 29 Jul 2015 16:11:33 +0200 Subject: [bug] fixed syntax error in models.py The lambdas take two args, so it needs to be a tuple. Furthermore filter needs a collection. --- mail/src/leap/mail/adaptors/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mail') diff --git a/mail/src/leap/mail/adaptors/models.py b/mail/src/leap/mail/adaptors/models.py index c5b838a..2bf9e60 100644 --- a/mail/src/leap/mail/adaptors/models.py +++ b/mail/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] -- cgit v1.2.3