mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 23:50:03 -06:00
py3: ldap modlist must have keys as string, not bytes
https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
parent
63b5d4a859
commit
bbe8849a65
@ -887,7 +887,8 @@ class LDAPClient(object):
|
||||
elif isinstance(val, tuple):
|
||||
return tuple(self.encode(m) for m in val)
|
||||
elif isinstance(val, dict):
|
||||
dct = dict((self.encode(k), self.encode(v)) for k, v in val.items())
|
||||
# key in dict must be str not bytes
|
||||
dct = dict((k, self.encode(v)) for k, v in val.items())
|
||||
return dct
|
||||
elif isinstance(val, datetime.datetime):
|
||||
return val.strftime(LDAP_GENERALIZED_TIME_FORMAT)
|
||||
|
Loading…
Reference in New Issue
Block a user