From 7b03533629019f269f1ef5e0f1a5b39e55eaee69 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Wed, 15 Jul 2015 14:41:01 +0200 Subject: [PATCH] [py3] filter() returns a generator, convert it to a list --- Lib/ldap/modlist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/ldap/modlist.py b/Lib/ldap/modlist.py index 492686d..0053a3f 100644 --- a/Lib/ldap/modlist.py +++ b/Lib/ldap/modlist.py @@ -82,10 +82,10 @@ def modifyModlist( # This attribute type is ignored continue # Filter away null-strings - new_value = filter(lambda x:x!=None,new_entry[attrtype]) + new_value = list(filter(lambda x:x!=None,new_entry[attrtype])) if attrtype_lower in attrtype_lower_map: old_value = old_entry.get(attrtype_lower_map[attrtype_lower],[]) - old_value = filter(lambda x:x!=None,old_value) + old_value = list(filter(lambda x:x!=None,old_value)) del attrtype_lower_map[attrtype_lower] else: old_value = []