utils.iter: Allow None argument to filterfalse and all.

Fixes bug in the Debian plugin.
This commit is contained in:
Valentin Lorentz 2016-10-27 20:51:36 +02:00
parent df130e8931
commit 5b29c8c0dd

View File

@ -38,6 +38,8 @@ from . import minisix
# For old plugins
ifilter = filter
def filterfalse(p, L):
if p is None:
p = lambda x:x
return filter(lambda x:not p(x), L)
ifilterfalse = filterfalse
imap = map