mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Catch traceback when LDAP returns something other than the nested tuple
This commit is contained in:
parent
4af4280d04
commit
c57a232809
@ -407,8 +407,14 @@ def expand_ldap_entries(entries, opts=None):
|
||||
search_string,
|
||||
['cn'])
|
||||
for ldap_match in search_results:
|
||||
minion_id = ldap_match[1]['cn'][0].lower()
|
||||
retrieved_minion_ids.append(minion_id)
|
||||
try:
|
||||
minion_id = ldap_match[1]['cn'][0].lower()
|
||||
retrieved_minion_ids.append(minion_id)
|
||||
except TypeError:
|
||||
# TypeError here just means that one of the returned
|
||||
# entries didn't match the format we expected
|
||||
# from LDAP.
|
||||
pass
|
||||
|
||||
for minion_id in retrieved_minion_ids:
|
||||
acl_tree.append({minion_id: permissions})
|
||||
|
Loading…
Reference in New Issue
Block a user