mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
py3: ipaldap: encode Boolean as bytes
Python LDAP requires bytes https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Jan Cholasta <jcholast@redhat.com> Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
This commit is contained in:
@@ -847,9 +847,9 @@ class LDAPClient(object):
|
||||
# entered for a boolean value instead of the boolean clause.
|
||||
if isinstance(val, bool):
|
||||
if val:
|
||||
return 'TRUE'
|
||||
return b'TRUE'
|
||||
else:
|
||||
return 'FALSE'
|
||||
return b'FALSE'
|
||||
elif isinstance(val, (unicode, six.integer_types, Decimal, DN,
|
||||
Principal)):
|
||||
return six.text_type(val).encode('utf-8')
|
||||
|
Reference in New Issue
Block a user