mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-01 00:03:10 +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.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
|
||||
|
||||
try:
|
||||
@@ -145,9 +145,9 @@ class LdapEntry(LdapGeneric):
|
||||
attrs[name] = []
|
||||
|
||||
if isinstance(value, list):
|
||||
attrs[name] = value
|
||||
attrs[name] = [map(to_bytes, value)]
|
||||
else:
|
||||
attrs[name].append(str(value))
|
||||
attrs[name].append(to_bytes(value))
|
||||
|
||||
return attrs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user