mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 20:52:42 +01:00
utils.iter: Allow None argument to filterfalse and all.
Fixes bug in the Debian plugin.
This commit is contained in:
parent
df130e8931
commit
5b29c8c0dd
@ -38,6 +38,8 @@ from . import minisix
|
|||||||
# For old plugins
|
# For old plugins
|
||||||
ifilter = filter
|
ifilter = filter
|
||||||
def filterfalse(p, L):
|
def filterfalse(p, L):
|
||||||
|
if p is None:
|
||||||
|
p = lambda x:x
|
||||||
return filter(lambda x:not p(x), L)
|
return filter(lambda x:not p(x), L)
|
||||||
ifilterfalse = filterfalse
|
ifilterfalse = filterfalse
|
||||||
imap = map
|
imap = map
|
||||||
|
Loading…
Reference in New Issue
Block a user