diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2011-12-27 21:05:06 +0000 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2011-12-27 21:05:06 +0000 |
commit | 67afca76987fe769f4e7345f5e8396f67bf3fcbb (patch) | |
tree | fdcdbc57604247e8dac3577a3f7dc670adad696d /pynslcd/common.py | |
parent | 8190bfb90b272cb98fed05dfdb6d2398c2c20a80 (diff) |
make logging more consistent and remove test bases from shadow and passwd maps
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1574 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'pynslcd/common.py')
-rw-r--r-- | pynslcd/common.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pynslcd/common.py b/pynslcd/common.py index a44f708..ad79a5c 100644 --- a/pynslcd/common.py +++ b/pynslcd/common.py @@ -85,6 +85,8 @@ class Search(object): case_insensitive = [] limit_attributes = [] +# FIXME: figure out which of these arguments are actually needed + def __init__(self, conn, base=None, scope=None, filter=None, attributes=None, parameters=None): # load information from module that defines the class @@ -143,19 +145,21 @@ class Search(object): # check that these attributes have at least one value for attr in self.required: if not attributes.get(attr, None): - print '%s: attribute %s not found' % (dn, self.attmap[attr]) + print '%s: %s: missing' % (dn, self.attmap[attr]) return # check that requested attribute is present (case sensitive) for attr in self.case_sensitive: value = self.parameters.get(attr, None) if value and str(value) not in attributes[attr]: - print '%s: attribute %s does not contain %r value' % (dn, self.attmap[attr], value) + # TODO: log at debug level, this can happen in normal cases + print '%s: %s: does not contain %r value' % (dn, self.attmap[attr], value) return # not found, skip entry # check that requested attribute is present (case insensitive) for attr in self.case_insensitive: value = self.parameters.get(attr, None) if value and str(value).lower() not in (x.lower() for x in attributes[attr]): - print '%s: attribute %s does not contain %r value' % (dn, self.attmap[attr], value) + # TODO: log at debug level, this can happen in normal cases + print '%s: %s: does not contain %r value' % (dn, self.attmap[attr], value) return # not found, skip entry # limit attribute values to requested value for attr in self.limit_attributes: |