1010
1111from ldap import __version__
1212
13- import string , ldap ,ldap .cidict
13+ import ldap ,ldap .cidict
1414
1515
1616def list_dict (l ,case_insensitive = 0 ):
@@ -31,10 +31,10 @@ def list_dict(l,case_insensitive=0):
3131
3232def addModlist (entry ,ignore_attr_types = None ):
3333 """Build modify list for call of method LDAPObject.add()"""
34- ignore_attr_types = list_dict (map (string .lower ,(ignore_attr_types or [])))
34+ ignore_attr_types = list_dict (map (str .lower ,(ignore_attr_types or [])))
3535 modlist = []
3636 for attrtype in entry .keys ():
37- if ignore_attr_types .has_key (string .lower (attrtype )):
37+ if ignore_attr_types .has_key (str .lower (attrtype )):
3838 # This attribute type is ignored
3939 continue
4040 # Eliminate empty attr value strings in list
@@ -66,14 +66,14 @@ def modifyModlist(
6666 List of attribute type names for which comparison will be made
6767 case-insensitive
6868 """
69- ignore_attr_types = list_dict (map (string .lower ,(ignore_attr_types or [])))
70- case_ignore_attr_types = list_dict (map (string .lower ,(case_ignore_attr_types or [])))
69+ ignore_attr_types = list_dict (map (str .lower ,(ignore_attr_types or [])))
70+ case_ignore_attr_types = list_dict (map (str .lower ,(case_ignore_attr_types or [])))
7171 modlist = []
7272 attrtype_lower_map = {}
7373 for a in old_entry .keys ():
74- attrtype_lower_map [string .lower (a )]= a
74+ attrtype_lower_map [str .lower (a )]= a
7575 for attrtype in new_entry .keys ():
76- attrtype_lower = string .lower (attrtype )
76+ attrtype_lower = str .lower (attrtype )
7777 if ignore_attr_types .has_key (attrtype_lower ):
7878 # This attribute type is ignored
7979 continue
0 commit comments