Eliminate type error on search_s
Guard the list comprehension to eliminate 'None' valued keys from the attrlist from causing an exception when trying to iterate on the None singleton. related-bug: #1231772 Change-Id: I823a53d100b5e4210c767507e3233b61ed372068
This commit is contained in:
parent
5db7c43f4f
commit
1db2618601
|
@ -556,7 +556,8 @@ class LdapWrapper(object):
|
|||
# allows us to set mapped attributes to "None" as defaults in config.
|
||||
# Without this filtering, the ldap query would raise a TypeError since
|
||||
# attrlist is expected to be an iterable of strings.
|
||||
attrlist = [attr for attr in attrlist if attr is not None]
|
||||
if attrlist is not None:
|
||||
attrlist = [attr for attr in attrlist if attr is not None]
|
||||
LOG.debug(_(
|
||||
'LDAP search: dn=%(dn)s, scope=%(scope)s, query=%(query)s, '
|
||||
'attrs=%(attrlist)s') % {
|
||||
|
|
Loading…
Reference in New Issue