Change filter with lambda to list comprehension
It is more readable and returns a list therefore it is compatible both with Python 2 and 3. Signed-off-by: Łukasz Żarnowiecki <dolohow@outlook.com> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:

committed by
Nicolas Sebrecht

parent
068ac7c410
commit
19c43308b9
@ -433,8 +433,7 @@ class IMAPServer:
|
||||
|
||||
if not tried_to_authn:
|
||||
methods = ", ".join(map(
|
||||
lambda x: x[5:], filter(lambda x: x[0:5] == "AUTH=",
|
||||
imapobj.capabilities)
|
||||
lambda x: x[5:], [x for x in imapobj.capabilities if x[0:5] == "AUTH="]
|
||||
))
|
||||
raise OfflineImapError(u"Repository %s: no supported "
|
||||
"authentication mechanisms found; configured %s, "
|
||||
|
Reference in New Issue
Block a user