'Executes the search on the given connection (an LDAPObject). filterargs
is an object that will be used for expansion of the filter string.
The python-ldap library returns utf8-encoded strings. For the sake of
sanity, this method will decode all result strings and return them as
Unicode.'

def execute(self, connection, filterargs=()):

    try:
        filterstr = (self.filterstr % filterargs)
        results = connection.search_s(force_str(self.base_dn), self.scope, force_str(filterstr))
    except ldap.LDAPError as e:
        results = []
        logger.error((u"search_s('%s',    %d,    '%s')    raised    %s" % (self.base_dn, self.scope, filterstr, pprint.pformat(e))))
    return self._process_results(results)
