diff --git a/mylib/ldap.py b/mylib/ldap.py index 2bf9079..20425f1 100644 --- a/mylib/ldap.py +++ b/mylib/ldap.py @@ -581,6 +581,9 @@ class LdapClient: objects = {} for obj_dn, obj_attrs in ldap_data.items(): + # Ignore invalid result (view with an AD) + if not obj_dn or not isinstance(obj_attrs, dict): + continue objects[obj_dn] = self._get_obj(obj_dn, obj_attrs) self._cached_objects[name] = objects if not key_attr or key_attr == 'dn':