From 5060fdfade63f299bf3ad15c16a1aff06135b80f Mon Sep 17 00:00:00 2001 From: Pavel Zuna Date: Tue, 23 Nov 2010 09:02:54 -0500 Subject: Change signature of LDAPSearch.pre_callback. Add the opportunity to change base DN and scope in the callback. --- ipalib/plugins/host.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ipalib/plugins/host.py') diff --git a/ipalib/plugins/host.py b/ipalib/plugins/host.py index 9d3a2a9a..b3caf185 100644 --- a/ipalib/plugins/host.py +++ b/ipalib/plugins/host.py @@ -556,11 +556,11 @@ class host_find(LDAPSearch): ) member_attributes = ['managedby'] - def pre_callback(self, ldap, filter, attrs_list, base_dn, *args, **options): + def pre_callback(self, ldap, filter, attrs_list, base_dn, scope, *args, **options): if 'locality' in attrs_list: attrs_list.remove('locality') attrs_list.append('l') - return filter.replace('locality', 'l') + return (filter.replace('locality', 'l'), base_dn, scope) def post_callback(self, ldap, entries, truncated, *args, **options): for entry in entries: -- cgit