mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
ldap_entry bugfix (#43620)
This commit is contained in:
committed by
Abhijeet Kasurde
parent
2de692348f
commit
d971dd23a4
@@ -110,7 +110,7 @@ import traceback
|
|||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible.module_utils.six import string_types
|
from ansible.module_utils.six import string_types
|
||||||
from ansible.module_utils._text import to_native
|
from ansible.module_utils._text import to_native, to_bytes
|
||||||
from ansible.module_utils.ldap import LdapGeneric, gen_specs
|
from ansible.module_utils.ldap import LdapGeneric, gen_specs
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -145,9 +145,9 @@ class LdapEntry(LdapGeneric):
|
|||||||
attrs[name] = []
|
attrs[name] = []
|
||||||
|
|
||||||
if isinstance(value, list):
|
if isinstance(value, list):
|
||||||
attrs[name] = value
|
attrs[name] = [map(to_bytes, value)]
|
||||||
else:
|
else:
|
||||||
attrs[name].append(str(value))
|
attrs[name].append(to_bytes(value))
|
||||||
|
|
||||||
return attrs
|
return attrs
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user