for object in res:
self.dn_set.add(str(object.dn))
- error_count += self.check_object(object.dn, attrs=attrs)
+ error_count += self.check_object(object.dn, requested_attrs=attrs)
if DN is None:
error_count += self.check_rootdse()
raise KeyError
- def find_checkable_attrs(self, dn, attrs):
+ def find_checkable_attrs(self, dn, requested_attrs):
"""A helper function for check_object() that calculates the list of
attributes that need to be checked, and returns that as a list
in the original case, and a set normalised to lowercase (for
easy existence checks).
"""
- if attrs is None:
+ if requested_attrs is None:
attrs = ['*']
else:
- # make a local copy to modify
- attrs = list(attrs)
+ attrs = list(requested_attrs)
lc_attrs = set(x.lower() for x in attrs)
return attrs, lc_attrs
- def check_object(self, dn, attrs=None):
+ def check_object(self, dn, requested_attrs=None):
'''check one object'''
if self.verbose:
self.report("Checking object %s" % dn)
# search attrs are used to find the attributes, lc_attrs are
# used for existence checks
- search_attrs, lc_attrs = self.find_checkable_attrs(dn, attrs)
+ search_attrs, lc_attrs = self.find_checkable_attrs(dn, requested_attrs)
try:
sd_flags = 0